org.aspectj.org.eclipse.jdt.internal.core.util
Class FieldInfo

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
      extended by org.aspectj.org.eclipse.jdt.internal.core.util.FieldInfo
All Implemented Interfaces:
IFieldInfo

public class FieldInfo
extends ClassFileStruct
implements IFieldInfo

Default implementation of IFieldInfo.


Constructor Summary
FieldInfo(byte[] classFileBytes, IConstantPool constantPool, int offset)
           
 
Method Summary
 int getAccessFlags()
          Answer back the access flag of this field info.
 int getAttributeCount()
          Answer back the attribute number of the field info.
 IClassFileAttribute[] getAttributes()
          Answer back the collection of all attributes of the field info.
 IConstantValueAttribute getConstantValueAttribute()
          Answer back the constant value attribute of this field info if specified, null otherwise.
 char[] getDescriptor()
          Answer back the descriptor of this field info.
 int getDescriptorIndex()
          Answer back the descriptor index of this field info.
 char[] getName()
          Answer back the name of this field info.
 int getNameIndex()
          Answer back the name index of this field info.
 boolean hasConstantValueAttribute()
          Return true if the field info has a constant value attribute, false otherwise.
 boolean isDeprecated()
          Return true if the field info has a deprecated attribute, false otherwise.
 boolean isSynthetic()
          Return true if the field info is synthetic according to the JVM specification, false otherwise.
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
doubleAt, floatAt, i1At, i2At, i4At, i8At, u1At, u2At, u4At, utf8At
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldInfo

public FieldInfo(byte[] classFileBytes,
                 IConstantPool constantPool,
                 int offset)
          throws ClassFormatException
Parameters:
classFileBytes - byte[]
constantPool - IConstantPool
offset - int
Throws:
ClassFormatException
Method Detail

getAccessFlags

public int getAccessFlags()
Description copied from interface: IFieldInfo
Answer back the access flag of this field info.

Specified by:
getAccessFlags in interface IFieldInfo
Returns:
the access flag of this field info
See Also:
IFieldInfo.getAccessFlags()

getAttributeCount

public int getAttributeCount()
Description copied from interface: IFieldInfo
Answer back the attribute number of the field info.

Specified by:
getAttributeCount in interface IFieldInfo
Returns:
the attribute number of the field info
See Also:
IFieldInfo.getAttributeCount()

getAttributes

public IClassFileAttribute[] getAttributes()
Description copied from interface: IFieldInfo
Answer back the collection of all attributes of the field info. It includes SyntheticAttribute, ConstantValueAttributes, etc. Returns an empty collection if none.

Specified by:
getAttributes in interface IFieldInfo
Returns:
the collection of all attributes of the field info. It includes SyntheticAttribute, ConstantValueAttributes, etc. Returns an empty collection if none
See Also:
IFieldInfo.getAttributes()

getConstantValueAttribute

public IConstantValueAttribute getConstantValueAttribute()
Description copied from interface: IFieldInfo
Answer back the constant value attribute of this field info if specified, null otherwise.

Specified by:
getConstantValueAttribute in interface IFieldInfo
Returns:
the constant value attribute of this field info if specified, null otherwise
See Also:
IFieldInfo.getConstantValueAttribute()

getDescriptor

public char[] getDescriptor()
Description copied from interface: IFieldInfo
Answer back the descriptor of this field info. The descriptor is returned as specified in the JVM specifications.

Specified by:
getDescriptor in interface IFieldInfo
Returns:
the descriptor of this field info. The descriptor is returned as specified in the JVM specifications
See Also:
IFieldInfo.getDescriptor()

getDescriptorIndex

public int getDescriptorIndex()
Description copied from interface: IFieldInfo
Answer back the descriptor index of this field info.

Specified by:
getDescriptorIndex in interface IFieldInfo
Returns:
the descriptor index of this field info
See Also:
IFieldInfo.getDescriptorIndex()

getName

public char[] getName()
Description copied from interface: IFieldInfo
Answer back the name of this field info. The name is returned as specified in the JVM specifications.

Specified by:
getName in interface IFieldInfo
Returns:
the name of this field info. The name is returned as specified in the JVM specifications
See Also:
IFieldInfo.getName()

getNameIndex

public int getNameIndex()
Description copied from interface: IFieldInfo
Answer back the name index of this field info.

Specified by:
getNameIndex in interface IFieldInfo
Returns:
the name index of this field info
See Also:
IFieldInfo.getNameIndex()

hasConstantValueAttribute

public boolean hasConstantValueAttribute()
Description copied from interface: IFieldInfo
Return true if the field info has a constant value attribute, false otherwise.

Specified by:
hasConstantValueAttribute in interface IFieldInfo
Returns:
true if the field info has a constant value attribute, false otherwise
See Also:
IFieldInfo.hasConstantValueAttribute()

isDeprecated

public boolean isDeprecated()
Description copied from interface: IFieldInfo
Return true if the field info has a deprecated attribute, false otherwise.

Specified by:
isDeprecated in interface IFieldInfo
Returns:
true if the field info has a deprecated attribute, false otherwise
See Also:
IFieldInfo.isDeprecated()

isSynthetic

public boolean isSynthetic()
Description copied from interface: IFieldInfo
Return true if the field info is synthetic according to the JVM specification, false otherwise.

Note that prior to JDK 1.5, synthetic fields were always marked using an attribute; with 1.5, synthetic fields can also be marked using the IModifierConstants.ACC_SYNTHETIC flag.

Specified by:
isSynthetic in interface IFieldInfo
Returns:
true if the field info is synthetic according to the JVM specification, false otherwise
See Also:
IFieldInfo.isSynthetic()