org.aspectj.apache.bcel.classfile
Class Method
java.lang.Object
org.aspectj.apache.bcel.classfile.Modifiers
org.aspectj.apache.bcel.classfile.FieldOrMethod
org.aspectj.apache.bcel.classfile.Method
- All Implemented Interfaces:
- Node
public final class Method
- extends FieldOrMethod
This class represents the method info structure, i.e., the representation for a method in the class. See JVM specification for
details. A method has access flags, a name, a signature and a number of attributes.
Methods inherited from class org.aspectj.apache.bcel.classfile.Modifiers |
getModifiers, isAbstract, isBridge, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVarargs, isVolatile, setModifiers |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NO_PARAMETER_ANNOTATIONS
public static final AnnotationGen[][] NO_PARAMETER_ANNOTATIONS
NoMethods
public static final Method[] NoMethods
Method
public Method(Method c)
- Initialize from another object. Note that both objects use the same references (shallow copy). Use clone() for a physical
copy.
Method
public Method(int access_flags,
int name_index,
int signature_index,
Attribute[] attributes,
ConstantPool constant_pool)
accept
public void accept(ClassVisitor v)
setAttributes
public void setAttributes(Attribute[] attributes)
- Overrides:
setAttributes
in class FieldOrMethod
- Parameters:
attributes
- Collection of object attributes.
getCode
public final Code getCode()
- Returns:
- Code attribute of method, if any
getExceptionTable
public final ExceptionTable getExceptionTable()
getLocalVariableTable
public final LocalVariableTable getLocalVariableTable()
- Return LocalVariableTable of code attribute if any (the call is forwarded to the Code attribute)
getLineNumberTable
public final LineNumberTable getLineNumberTable()
- Return LineNumberTable of code attribute if any (the call is forwarded to the Code attribute)
toString
public final java.lang.String toString()
- Return string representation close to declaration format, eg: 'public static void main(String[] args) throws IOException'
- Overrides:
toString
in class java.lang.Object
getReturnType
public Type getReturnType()
- Returns:
- return type of method
getArgumentTypes
public Type[] getArgumentTypes()
- Returns:
- array of method argument types
getAnnotationsOnParameter
public AnnotationGen[] getAnnotationsOnParameter(int i)
getParameterAnnotations
public AnnotationGen[][] getParameterAnnotations()