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
FieldsFields inherited from class FieldOrMethod
attributes, cpool, nameIndex, signatureIndexModifier and TypeFieldDescriptionprotected Attribute[]protected ConstantPoolprotected intprotected int -
Constructor Summary
ConstructorsConstructorDescriptionMethod(int access_flags, int name_index, int signature_index, Attribute[] attributes, ConstantPool constant_pool) Initialize from another object. -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAnnotationsOnParameter(int i) Type[]final CodegetCode()final ExceptionTablefinal LineNumberTableReturn LineNumberTable of code attribute if any (the call is forwarded to the Code attribute)final LocalVariableTableReturn LocalVariableTable of code attribute if any (the call is forwarded to the Code attribute)AnnotationGen[][]voidsetAttributes(Attribute[] attributes) final StringtoString()Return string representation close to declaration format, eg: 'public static void main(String[] args) throws IOException'Methods inherited from class FieldOrMethod
dump, getAnnotations, getAttributes, getConstantPool, getDeclaredSignature, getGenericSignature, getName, getNameIndex, getSignature, getSignatureIndexModifier and TypeMethodDescriptionfinal voiddump(DataOutputStream file) final Attribute[]final ConstantPoolfinal StringThis will return the contents of a signature attribute attached to a member, or if there is none it will return the same as 'getSignature()'.final StringHunts for a signature attribute on the member and returns its contents.final StringgetName()final intfinal Stringfinal intMethods inherited from class Modifiers
getModifiers, isAbstract, isBridge, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVarargs, isVolatile, setModifiersModifier and TypeMethodDescriptionfinal intfinal booleanfinal booleanisBridge()final booleanisFinal()final booleanfinal booleanisNative()final booleanfinal booleanfinal booleanisPublic()final booleanisStatic()final booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal voidsetModifiers(int modifiers)
-
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:
setAttributesin 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
-
getReturnType
- Returns:
- return type of method
-
getArgumentTypes
- Returns:
- array of method argument types
-
getAnnotationsOnParameter
-
getParameterAnnotations
-