java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileStruct
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.MethodInfo
Alle implementierten Schnittstellen:
Comparable, IBinaryMethod, IGenericMethod
Bekannte direkte Unterklassen:
AnnotationMethodInfo, MethodInfoWithAnnotations

public class MethodInfo extends ClassFileStruct implements IBinaryMethod, Comparable
  • Felddetails

    • accessFlags

      protected int accessFlags
    • attributeBytes

      protected int attributeBytes
    • descriptor

      protected char[] descriptor
    • exceptionNames

      protected volatile char[][] exceptionNames
    • name

      protected char[] name
    • signature

      protected char[] signature
    • signatureUtf8Offset

      protected int signatureUtf8Offset
    • tagBits

      protected long tagBits
    • argumentNames

      protected volatile char[][] argumentNames
    • version

      protected long version
  • Konstruktordetails

    • MethodInfo

      protected MethodInfo(byte[] classFileBytes, int[] offsets, int offset, long version)
      Parameter:
      classFileBytes - byte[]
      offsets - int[]
      offset - int
      version - class file version
  • Methodendetails

    • createMethod

      public static MethodInfo createMethod(byte[] classFileBytes, int[] offsets, int offset, long version)
    • compareTo

      public int compareTo(Object o)
      Angegeben von:
      compareTo in Schnittstelle Comparable
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • getAnnotations

      public IBinaryAnnotation[] getAnnotations()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the runtime visible and invisible annotations for this method or null if none.
      Angegeben von:
      getAnnotations in Schnittstelle IBinaryMethod
    • getArgumentNames

      public char[][] getArgumentNames()
      Beschreibung aus Schnittstelle kopiert: IGenericMethod
      Answer the names of the argument or null if the argument names are not available.
      Angegeben von:
      getArgumentNames in Schnittstelle IGenericMethod
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.env.IGenericMethod#getArgumentNames()
    • getDefaultValue

      public Object getDefaultValue()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Return ClassSignature for a Class Class. Return Constant for compile-time constant of primitive type, as well as String literals. Return EnumConstantSignature if value is an enum constant. Return IBinaryAnnotation for annotation type. Return Object[] for array type.
      Angegeben von:
      getDefaultValue in Schnittstelle IBinaryMethod
      Gibt zurück:
      default value of this annotation method
    • getExceptionTypeNames

      public char[][] getExceptionTypeNames()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the resolved names of the exception types in the class file format as specified in section 4.2 of the Java 2 VM spec or null if the array is empty. For example, java.lang.String is java/lang/String.
      Angegeben von:
      getExceptionTypeNames in Schnittstelle IBinaryMethod
    • getGenericSignature

      public char[] getGenericSignature()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the receiver's MethodSignature, which describes the type parameters, parameter types, return type, and exception types as specified in "4.7.9.1 Signatures" of the Java SE 8 VM spec.
      Angegeben von:
      getGenericSignature in Schnittstelle IBinaryMethod
    • getMethodDescriptor

      public char[] getMethodDescriptor()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the receiver's method descriptor which describes the parameter Ungültige Eingabe: "&" return types as specified in section 4.4.3 of the Java 2 VM spec. For example: - int foo(String) is (Ljava/lang/String;)I - Object[] foo(int) is (I)[Ljava/lang/Object;
      Angegeben von:
      getMethodDescriptor in Schnittstelle IBinaryMethod
    • getModifiers

      public int getModifiers()
      Answer an int whose bits are set according the access constants defined by the VM spec. Set the AccDeprecated and AccSynthetic bits if necessary
      Angegeben von:
      getModifiers in Schnittstelle IGenericMethod
      Gibt zurück:
      int
    • getParameterAnnotations

      public IBinaryAnnotation[] getParameterAnnotations(int index, char[] classFileName)
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the annotations on the indexth parameter or null if none
      Angegeben von:
      getParameterAnnotations in Schnittstelle IBinaryMethod
      Parameter:
      index - the index of the parameter of interest
      classFileName - (file) name of the declaring class for error reporting
    • getAnnotatedParametersCount

      public int getAnnotatedParametersCount()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the number of parameter annotations that can be retrieved using IBinaryMethod.getParameterAnnotations(int, char[]).
      Angegeben von:
      getAnnotatedParametersCount in Schnittstelle IBinaryMethod
      Gibt zurück:
      one beyond the highest legal argument to IBinaryMethod.getParameterAnnotations(int, char[]).
    • getTypeAnnotations

      public IBinaryTypeAnnotation[] getTypeAnnotations()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the type annotations on this method.
      Angegeben von:
      getTypeAnnotations in Schnittstelle IBinaryMethod
    • getSelector

      public char[] getSelector()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the name of the method. For a constructor, answer Ungültige Eingabe: "&" for a clinit method.
      Angegeben von:
      getSelector in Schnittstelle IBinaryMethod
    • getTagBits

      public long getTagBits()
      Beschreibung aus Schnittstelle kopiert: IBinaryMethod
      Answer the tagbits set according to the bits for annotations.
      Angegeben von:
      getTagBits in Schnittstelle IBinaryMethod
    • initialize

      protected void initialize()
      This method is used to fully initialize the contents of the receiver. All methodinfos, fields infos will be therefore fully initialized and we can get rid of the bytes.
    • isClinit

      public boolean isClinit()
      Answer true if the method is a class initializer, false otherwise.
      Angegeben von:
      isClinit in Schnittstelle IBinaryMethod
      Gibt zurück:
      boolean
    • isConstructor

      public boolean isConstructor()
      Answer true if the method is a constructor, false otherwise.
      Angegeben von:
      isConstructor in Schnittstelle IGenericMethod
      Gibt zurück:
      boolean
    • isSynthetic

      public boolean isSynthetic()
      Return true if the field is a synthetic method, false otherwise.
      Gibt zurück:
      boolean
    • sizeInBytes

      public int sizeInBytes()
      Answer the size of the receiver in bytes.
      Gibt zurück:
      int
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • toStringContent

      protected void toStringContent(StringBuffer buffer)