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
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.
- Version:
- $Id: Method.java,v 1.11 2009/09/15 19:40:12 aclement Exp $
- Author:
- M. Dahm
-
Field Summary
Fields inherited from class org.aspectj.apache.bcel.classfile.FieldOrMethod
attributes, cpool, nameIndex, signatureIndex
-
Constructor Summary
ConstructorDescriptionMethod
(int access_flags, int name_index, int signature_index, Attribute[] attributes, ConstantPool constant_pool) Initialize from another object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
getAnnotationsOnParameter
(int i) Type[]
final Code
getCode()
final ExceptionTable
final LineNumberTable
Return LineNumberTable of code attribute if any (the call is forwarded to the Code attribute)final LocalVariableTable
Return LocalVariableTable of code attribute if any (the call is forwarded to the Code attribute)AnnotationGen[][]
void
setAttributes
(Attribute[] attributes) final String
toString()
Return string representation close to declaration format, eg: 'public static void main(String[] args) throws IOException'Methods inherited from class org.aspectj.apache.bcel.classfile.FieldOrMethod
dump, getAnnotations, getAttributes, getConstantPool, getDeclaredSignature, getGenericSignature, getName, getNameIndex, getSignature, getSignatureIndex
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
-
Field Details
-
NO_PARAMETER_ANNOTATIONS
-
NoMethods
-
-
Constructor Details
-
Method
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)
-
-
Method Details
-
accept
-
setAttributes
- Overrides:
setAttributes
in classFieldOrMethod
- Parameters:
attributes
- Collection of object attributes.
-
getCode
- Returns:
- Code attribute of method, if any
-
getExceptionTable
-
getLocalVariableTable
Return LocalVariableTable of code attribute if any (the call is forwarded to the Code attribute) -
getLineNumberTable
Return LineNumberTable of code attribute if any (the call is forwarded to the Code attribute) -
toString
Return string representation close to declaration format, eg: 'public static void main(String[] args) throws IOException' -
getReturnType
- Returns:
- return type of method
-
getArgumentTypes
- Returns:
- array of method argument types
-
getAnnotationsOnParameter
-
getParameterAnnotations
-