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
Default implementation of IMethodInfo.
-
Constructor Summary
ConstructorDescriptionMethodInfo(byte[] classFileBytes, IConstantPool constantPool, int offset, int decodingFlags)
-
Method Summary
Modifier and TypeMethodDescriptionint
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[]
getName()
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
isClinit()
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.
-
Constructor Details
-
MethodInfo
public MethodInfo(byte[] classFileBytes, IConstantPool constantPool, int offset, int decodingFlags) throws ClassFormatException- Parameters:
classFileBytes
- byte[]constantPool
- IConstantPooloffset
- intdecodingFlags
- 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 interfaceIMethodInfo
- 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 interfaceIMethodInfo
- 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
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 interfaceIMethodInfo
- 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
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 interfaceIMethodInfo
- 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 interfaceIMethodInfo
- 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 interfaceIMethodInfo
- Returns:
- the descriptor index of this method info
- See Also:
IMethodInfo.getDescriptorIndex()
-
getExceptionAttribute
Description copied from interface:IMethodInfo
Answer the exception attribute of this method info, null is none.- Specified by:
getExceptionAttribute
in interfaceIMethodInfo
- 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 interfaceIMethodInfo
- 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 interfaceIMethodInfo
- 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 interfaceIMethodInfo
- 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 interfaceIMethodInfo
- 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 interfaceIMethodInfo
- 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 interfaceIMethodInfo
- Returns:
- true if the method info is synthetic according to the JVM specification, false otherwise
- See Also:
IMethodInfo.isSynthetic()
-