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

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.classfmt.ClassFileStruct
      继承者 org.eclipse.jdt.internal.compiler.classfmt.FieldInfo
所有已实现的接口:
Comparable, IBinaryField, IGenericField
直接已知子类:
FieldInfoWithAnnotation

public class FieldInfo
extends ClassFileStruct
implements IBinaryField, Comparable


字段摘要
protected  int accessFlags
           
protected  int attributeBytes
           
protected  Constant constant
           
protected  char[] descriptor
           
protected  char[] name
           
protected  char[] signature
           
protected  int signatureUtf8Offset
           
protected  long tagBits
           
protected  Object wrappedConstantValue
           
 
构造方法摘要
protected FieldInfo(byte[] classFileBytes, int[] offsets, int offset)
           
 
方法摘要
 int compareTo(Object o)
           
static FieldInfo createField(byte[] classFileBytes, int[] offsets, int offset)
           
 boolean equals(Object o)
           
 IBinaryAnnotation[] getAnnotations()
          Answer the runtime visible and invisible annotations for this field or null if none.
 Constant getConstant()
          Return the constant of the field.
 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.
 int getModifiers()
          Answer an int whose bits are set according the access constants defined by the VM spec.
 char[] getName()
          Answer the name of the field.
 long getTagBits()
          Answer the tagbits set according to the bits for annotations.
 char[] getTypeName()
          Answer the resolved name of the receiver's type in the class file format as specified in section 4.3.2 of the Java 2 VM spec.
 Object getWrappedConstantValue()
          Return a wrapper that contains the constant of the field.
 boolean hasConstant()
          Return true if the field has a constant value attribute, false otherwise.
 int hashCode()
           
protected  void initialize()
          This method is used to fully initialize the contents of the receiver.
 boolean isSynthetic()
          Return true if the field is a synthetic field, false otherwise.
 int sizeInBytes()
          Answer the size of the receiver in bytes.
 void throwFormatException()
           
 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

constant

protected Constant constant

descriptor

protected char[] descriptor

name

protected char[] name

signature

protected char[] signature

signatureUtf8Offset

protected int signatureUtf8Offset

tagBits

protected long tagBits

wrappedConstantValue

protected Object wrappedConstantValue
构造方法详细信息

FieldInfo

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

createField

public static FieldInfo createField(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

getConstant

public Constant getConstant()
Return the constant of the field. Return org.eclipse.jdt.internal.compiler.impl.Constant.NotAConstant if there is none.

指定者:
接口 IBinaryField 中的 getConstant
返回:
org.eclipse.jdt.internal.compiler.impl.Constant

getGenericSignature

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

指定者:
接口 IBinaryField 中的 getGenericSignature

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

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

getName

public char[] getName()
Answer the name of the field.

指定者:
接口 IBinaryField 中的 getName
返回:
char[]

getTagBits

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

指定者:
接口 IBinaryField 中的 getTagBits

getTypeName

public char[] getTypeName()
Answer the resolved name of the receiver's type in the class file format as specified in section 4.3.2 of the Java 2 VM spec. For example: - java.lang.String is Ljava/lang/String; - an int is I - a 2 dimensional array of strings is [[Ljava/lang/String; - an array of floats is [F

指定者:
接口 IBinaryField 中的 getTypeName
返回:
char[]

getAnnotations

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

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

getWrappedConstantValue

public Object getWrappedConstantValue()
Return a wrapper that contains the constant of the field.

返回:
java.lang.Object

hasConstant

public boolean hasConstant()
Return true if the field has a constant value attribute, false otherwise.

返回:
boolean

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.


isSynthetic

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

返回:
boolean

sizeInBytes

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

返回:
int

throwFormatException

public void throwFormatException()
                          throws ClassFormatException
抛出:
ClassFormatException

toString

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

toStringContent

protected void toStringContent(StringBuffer buffer)


Copyright © 2013. All Rights Reserved.