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

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
      extended by 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
MethodInfo(byte[] classFileBytes, IConstantPool constantPool, int offset, int decodingFlags)
           
 
Method Summary
 int getAccessFlags()
          Answer back the access flags of this method info as specified in the JVM specifications.
 int getAttributeCount()
          Answer back the attribute number of the method info.
 IClassFileAttribute[] getAttributes()
          Answer back the collection of all attributes of the method info.
 ICodeAttribute getCodeAttribute()
          Answer the code attribute of this method info, null if none or if the decoding flag doesn't include METHOD_BODIES.
 char[] getDescriptor()
          Answer back the method descriptor of this method info as specified in the JVM specifications.
 int getDescriptorIndex()
          Answer back the descriptor index of this method info.
 IExceptionAttribute getExceptionAttribute()
          Answer the exception attribute of this method info, null is none.
 char[] getName()
          Answer back the name of this method info as specified in the JVM specifications.
 int getNameIndex()
          Answer back the name index of this method info.
 boolean isClinit()
          Answer true if this method info represents a <clinit> method, false otherwise.
 boolean isConstructor()
          Answer true if this method info represents a constructor, false otherwise.
 boolean isDeprecated()
          Answer true if this method info has a deprecated attribute, false otherwise.
 boolean isSynthetic()
          Return true if the method 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

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 Detail

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:
IMethodInfo.getAccessFlags()

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:
IMethodInfo.getAttributeCount()

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:
IMethodInfo.getAttributes()

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:
IMethodInfo.getCodeAttribute()

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:
IMethodInfo.getDescriptor()

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:
IMethodInfo.getDescriptorIndex()

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:
IMethodInfo.getExceptionAttribute()

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:
IMethodInfo.getName()

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:
IMethodInfo.getNameIndex()

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:
IMethodInfo.isClinit()

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:
IMethodInfo.isConstructor()

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:
IMethodInfo.isDeprecated()

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:
IMethodInfo.isSynthetic()