Class FieldInfo

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
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

    Constructors
    Constructor
    Description
    FieldInfo(byte[] classFileBytes, IConstantPool constantPool, int offset)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Answer back the access flag of this field info.
    int
    Answer back the attribute number of the field info.
    Answer back the collection of all attributes of the field info.
    Answer back the constant value attribute of this field info if specified, null otherwise.
    char[]
    Answer back the descriptor of this field info.
    int
    Answer back the descriptor index of this field info.
    char[]
    Answer back the name of this field info.
    int
    Answer back the name index of this field info.
    boolean
    Return true if the field info has a constant value attribute, false otherwise.
    boolean
    Return true if the field info has a deprecated attribute, false otherwise.
    boolean
    Return true if the field info is synthetic according to the JVM specification, false otherwise.

    Methods inherited from class ClassFileStruct

    doubleAt, floatAt, i1At, i2At, i4At, i8At, u1At, u2At, u4At, utf8At
    Modifier and Type
    Method
    Description
    protected double
    doubleAt(byte[] reference, int relativeOffset, int structOffset)
     
    protected float
    floatAt(byte[] reference, int relativeOffset, int structOffset)
     
    protected int
    i1At(byte[] reference, int relativeOffset, int structOffset)
     
    protected int
    i2At(byte[] reference, int relativeOffset, int structOffset)
     
    protected int
    i4At(byte[] reference, int relativeOffset, int structOffset)
     
    protected long
    i8At(byte[] reference, int relativeOffset, int structOffset)
     
    protected int
    u1At(byte[] reference, int relativeOffset, int structOffset)
     
    protected int
    u2At(byte[] reference, int relativeOffset, int structOffset)
     
    protected int
    u4At(byte[] reference, int relativeOffset, int structOffset)
    Returns an 32 bit integer created of 4 bytes.
    protected char[]
    utf8At(byte[] reference, int relativeOffset, int structOffset, int bytesAvailable)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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: