org.eclipse.jdt.internal.compiler.classfmt
类 MethodInfo

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.classfmt.ClassFileStruct
      继承者 org.eclipse.jdt.internal.compiler.classfmt.MethodInfo
所有已实现的接口:
Comparable, IBinaryMethod, IGenericMethod
直接已知子类:
AnnotationMethodInfo, MethodInfoWithAnnotations

public class MethodInfo
extends ClassFileStruct
implements IBinaryMethod, Comparable


字段摘要
protected  int accessFlags
           
protected  char[][] argumentNames
           
protected  int argumentNamesIndex
           
protected  int attributeBytes
           
protected  char[] descriptor
           
protected  char[][] exceptionNames
           
protected  char[] name
           
protected  char[] signature
           
protected  int signatureUtf8Offset
           
protected  long tagBits
           
 
构造方法摘要
protected MethodInfo(byte[] classFileBytes, int[] offsets, int offset)
           
 
方法摘要
 int compareTo(Object o)
           
static MethodInfo createMethod(byte[] classFileBytes, int[] offsets, int offset)
           
 boolean equals(Object o)
           
 IBinaryAnnotation[] getAnnotations()
          Answer the runtime visible and invisible annotations for this method or null if none.
 char[][] getArgumentNames()
          Answer the names of the argument or null if the argument names are not available.
 Object getDefaultValue()
          Return ClassSignature for a Class Class.
 char[][] getExceptionTypeNames()
          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.
 char[] getGenericSignature()
          Answer the receiver's signature which describes the parameter & return types as specified in section 4.4.4 of the Java 2 VM spec.
 char[] getMethodDescriptor()
          Answer the receiver's method descriptor which describes the parameter & return types as specified in section 4.3.3 of the Java 2 VM spec.
 int getModifiers()
          Answer an int whose bits are set according the access constants defined by the VM spec.
 IBinaryAnnotation[] getParameterAnnotations(int index)
          Answer the annotations on the indexth parameter or null if none
 char[] getSelector()
          Answer the name of the method.
 long getTagBits()
          Answer the tagbits set according to the bits for annotations.
 int hashCode()
           
protected  void initialize()
          This method is used to fully initialize the contents of the receiver.
 boolean isClinit()
          Answer true if the method is a class initializer, false otherwise.
 boolean isConstructor()
          Answer true if the method is a constructor, false otherwise.
 boolean isSynthetic()
          Return true if the field is a synthetic method, false otherwise.
 int sizeInBytes()
          Answer the size of the receiver in bytes.
 String toString()
           
protected  void toStringContent(StringBuffer buffer)
           
 
从类 org.eclipse.jdt.internal.compiler.classfmt.ClassFileStruct 继承的方法
doubleAt, floatAt, i4At, i8At, reset, u1At, u2At, u4At, utf8At
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

字段详细信息

accessFlags

protected int accessFlags

attributeBytes

protected int attributeBytes

descriptor

protected char[] descriptor

exceptionNames

protected char[][] exceptionNames

name

protected char[] name

signature

protected char[] signature

signatureUtf8Offset

protected int signatureUtf8Offset

tagBits

protected long tagBits

argumentNames

protected char[][] argumentNames

argumentNamesIndex

protected int argumentNamesIndex
构造方法详细信息

MethodInfo

protected MethodInfo(byte[] classFileBytes,
                     int[] offsets,
                     int offset)
参数:
classFileBytes - byte[]
offsets - int[]
offset - int
方法详细信息

createMethod

public static MethodInfo createMethod(byte[] classFileBytes,
                                      int[] offsets,
                                      int offset)

compareTo

public int compareTo(Object o)
指定者:
接口 Comparable 中的 compareTo

equals

public boolean equals(Object o)
覆盖:
Object 中的 equals

hashCode

public int hashCode()
覆盖:
Object 中的 hashCode

getAnnotations

public IBinaryAnnotation[] getAnnotations()
从接口 IBinaryMethod 复制的描述
Answer the runtime visible and invisible annotations for this method or null if none.

指定者:
接口 IBinaryMethod 中的 getAnnotations
返回:
the annotations or null if there is none.

getArgumentNames

public char[][] getArgumentNames()
从接口 IGenericMethod 复制的描述
Answer the names of the argument or null if the argument names are not available.

指定者:
接口 IGenericMethod 中的 getArgumentNames
另请参见:
IGenericMethod.getArgumentNames()

getDefaultValue

public Object getDefaultValue()
从接口 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.

指定者:
接口 IBinaryMethod 中的 getDefaultValue
返回:
default value of this annotation method

getExceptionTypeNames

public char[][] getExceptionTypeNames()
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.

指定者:
接口 IBinaryMethod 中的 getExceptionTypeNames
返回:
char[][]

getGenericSignature

public char[] getGenericSignature()
从接口 IBinaryMethod 复制的描述
Answer the receiver's signature which describes the parameter & return types as specified in section 4.4.4 of the Java 2 VM spec.

指定者:
接口 IBinaryMethod 中的 getGenericSignature

getMethodDescriptor

public char[] getMethodDescriptor()
Answer the receiver's method descriptor which describes the parameter & return types as specified in section 4.3.3 of the Java 2 VM spec. For example: - int foo(String) is (Ljava/lang/String;)I - void foo(Object[]) is (I)[Ljava/lang/Object;

指定者:
接口 IBinaryMethod 中的 getMethodDescriptor
返回:
char[]

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

指定者:
接口 IGenericMethod 中的 getModifiers
返回:
int

getParameterAnnotations

public IBinaryAnnotation[] getParameterAnnotations(int index)
从接口 IBinaryMethod 复制的描述
Answer the annotations on the indexth parameter or null if none

指定者:
接口 IBinaryMethod 中的 getParameterAnnotations
参数:
index - the index of the parameter of interest

getSelector

public char[] getSelector()
Answer the name of the method. For a constructor, answer & for a clinit method.

指定者:
接口 IBinaryMethod 中的 getSelector
返回:
char[]

getTagBits

public long getTagBits()
从接口 IBinaryMethod 复制的描述
Answer the tagbits set according to the bits for annotations.

指定者:
接口 IBinaryMethod 中的 getTagBits

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.

指定者:
接口 IBinaryMethod 中的 isClinit
返回:
boolean

isConstructor

public boolean isConstructor()
Answer true if the method is a constructor, false otherwise.

指定者:
接口 IGenericMethod 中的 isConstructor
返回:
boolean

isSynthetic

public boolean isSynthetic()
Return true if the field is a synthetic method, false otherwise.

返回:
boolean

sizeInBytes

public int sizeInBytes()
Answer the size of the receiver in bytes.

返回:
int

toString

public String toString()
覆盖:
Object 中的 toString

toStringContent

protected void toStringContent(StringBuffer buffer)


Copyright © 2013. All Rights Reserved.