Class MethodInfo

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
org.aspectj.org.eclipse.jdt.internal.core.util.MethodInfo
All Implemented Interfaces:
IMethodInfo

public class MethodInfo extends ClassFileStruct implements IMethodInfo
Default implementation of IMethodInfo.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    int
    Answer back the access flags of this method info as specified in the JVM specifications.
    int
    Answer back the attribute number of the method info.
    Answer back the collection of all attributes of the method info.
    Answer the code attribute of this method info, null if none or if the decoding flag doesn't include METHOD_BODIES.
    char[]
    Answer back the method descriptor of this method info as specified in the JVM specifications.
    int
    Answer back the descriptor index of this method info.
    Answer the exception attribute of this method info, null is none.
    char[]
    Answer back the name of this method info as specified in the JVM specifications.
    int
    Answer back the name index of this method info.
    boolean
    Answer true if this method info represents a <clinit> method, false otherwise.
    boolean
    Answer true if this method info represents a constructor, false otherwise.
    boolean
    Answer true if this method info has a deprecated attribute, false otherwise.
    boolean
    Return true if the method 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

    • MethodInfo

      public MethodInfo(byte[] classFileBytes, IConstantPool constantPool, int offset, int decodingFlags) throws ClassFormatException
      Parameters:
      classFileBytes - byte[]
      constantPool - IConstantPool
      offset - int
      decodingFlags - int
      Throws:
      ClassFormatException
  • Method Details

    • getAccessFlags

      public int getAccessFlags()
      Description copied from interface: IMethodInfo
      Answer back the access flags of this method info as specified in the JVM specifications.
      Specified by:
      getAccessFlags in interface IMethodInfo
      Returns:
      the access flags of this method info as specified in the JVM specifications
      See Also:
    • getAttributeCount

      public int getAttributeCount()
      Description copied from interface: IMethodInfo
      Answer back the attribute number of the method info. It includes the CodeAttribute if any even if the decoding flags doesn't include METHOD_BODIES.
      Specified by:
      getAttributeCount in interface IMethodInfo
      Returns:
      the attribute number of the method info. It includes the CodeAttribute if any even if the decoding flags doesn't include METHOD_BODIES
      See Also:
    • getAttributes

      public IClassFileAttribute[] getAttributes()
      Description copied from interface: IMethodInfo
      Answer back the collection of all attributes of the method info. It includes SyntheticAttribute, CodeAttributes, etc. It doesn't include the CodeAttribute if the decoding flags doesn't include METHOD_BODIES. Returns an empty collection if none.
      Specified by:
      getAttributes in interface IMethodInfo
      Returns:
      the collection of all attributes of the method info. It includes SyntheticAttribute, CodeAttributes, etc. It doesn't include the CodeAttribute if the decoding flags doesn't include METHOD_BODIES. Returns an empty collection if none
      See Also:
    • getCodeAttribute

      public ICodeAttribute getCodeAttribute()
      Description copied from interface: IMethodInfo
      Answer the code attribute of this method info, null if none or if the decoding flag doesn't include METHOD_BODIES.
      Specified by:
      getCodeAttribute in interface IMethodInfo
      Returns:
      the code attribute of this method info, null if none or if the decoding flag doesn't include METHOD_BODIES
      See Also:
    • getDescriptor

      public char[] getDescriptor()
      Description copied from interface: IMethodInfo
      Answer back the method descriptor of this method info as specified in the JVM specifications.
      Specified by:
      getDescriptor in interface IMethodInfo
      Returns:
      the method descriptor of this method info as specified in the JVM specifications
      See Also:
    • getDescriptorIndex

      public int getDescriptorIndex()
      Description copied from interface: IMethodInfo
      Answer back the descriptor index of this method info.
      Specified by:
      getDescriptorIndex in interface IMethodInfo
      Returns:
      the descriptor index of this method info
      See Also:
    • getExceptionAttribute

      public IExceptionAttribute getExceptionAttribute()
      Description copied from interface: IMethodInfo
      Answer the exception attribute of this method info, null is none.
      Specified by:
      getExceptionAttribute in interface IMethodInfo
      Returns:
      the exception attribute of this method info, null is none
      See Also:
    • getName

      public char[] getName()
      Description copied from interface: IMethodInfo
      Answer back the name of this method info as specified in the JVM specifications.
      Specified by:
      getName in interface IMethodInfo
      Returns:
      the name of this method info as specified in the JVM specifications
      See Also:
    • getNameIndex

      public int getNameIndex()
      Description copied from interface: IMethodInfo
      Answer back the name index of this method info.
      Specified by:
      getNameIndex in interface IMethodInfo
      Returns:
      the name index of this method info
      See Also:
    • isClinit

      public boolean isClinit()
      Description copied from interface: IMethodInfo
      Answer true if this method info represents a <clinit> method, false otherwise.
      Specified by:
      isClinit in interface IMethodInfo
      Returns:
      true if this method info represents a <clinit> method, false otherwise
      See Also:
    • isConstructor

      public boolean isConstructor()
      Description copied from interface: IMethodInfo
      Answer true if this method info represents a constructor, false otherwise.
      Specified by:
      isConstructor in interface IMethodInfo
      Returns:
      true if this method info represents a constructor, false otherwise
      See Also:
    • isDeprecated

      public boolean isDeprecated()
      Description copied from interface: IMethodInfo
      Answer true if this method info has a deprecated attribute, false otherwise.
      Specified by:
      isDeprecated in interface IMethodInfo
      Returns:
      true if this method info has a deprecated attribute, false otherwise
      See Also:
    • isSynthetic

      public boolean isSynthetic()
      Description copied from interface: IMethodInfo
      Return true if the method 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 IMethodInfo
      Returns:
      true if the method info is synthetic according to the JVM specification, false otherwise
      See Also: