Package org.aspectj.apache.bcel.generic
Class MethodGen
- java.lang.Object
-
- org.aspectj.apache.bcel.classfile.Modifiers
-
- org.aspectj.apache.bcel.generic.FieldGenOrMethodGen
-
- org.aspectj.apache.bcel.generic.MethodGen
-
public class MethodGen extends FieldGenOrMethodGen
-
-
Field Summary
-
Fields inherited from class org.aspectj.apache.bcel.generic.FieldGenOrMethodGen
annotationList, cp, name, type
-
-
Constructor Summary
Constructors Constructor Description MethodGen(int access_flags, Type return_type, Type[] arg_types, String[] arg_names, String method_name, String class_name, InstructionList il, ConstantPool cp)MethodGen(Method m, String class_name, ConstantPool cp)MethodGen(Method m, String class_name, ConstantPool cp, boolean useTags)
-
Method Summary
-
Methods inherited from class org.aspectj.apache.bcel.generic.FieldGenOrMethodGen
addAnnotation, addAnnotationsAsAttribute, addAttribute, getAnnotations, getAttributes, getAttributesImmutable, getConstantPool, getName, getType, removeAnnotation, removeAnnotations, removeAttribute, removeAttributes, setConstantPool, setName, setType
-
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
-
-
-
-
Constructor Detail
-
MethodGen
public MethodGen(int access_flags, Type return_type, Type[] arg_types, String[] arg_names, String method_name, String class_name, InstructionList il, ConstantPool cp)
-
MethodGen
public MethodGen(Method m, String class_name, ConstantPool cp)
-
MethodGen
public MethodGen(Method m, String class_name, ConstantPool cp, boolean useTags)
-
-
Method Detail
-
getHighestlinenumber
public int getHighestlinenumber()
-
addLocalVariable
public LocalVariableGen addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end)
-
addLocalVariable
public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end)
-
removeLocalVariable
public void removeLocalVariable(LocalVariableGen l)
-
removeLocalVariables
public void removeLocalVariables()
-
getLocalVariables
public LocalVariableGen[] getLocalVariables()
-
getLocalVariableTable
public LocalVariableTable getLocalVariableTable(ConstantPool cp)
-
addLineNumber
public LineNumberGen addLineNumber(InstructionHandle ih, int src_line)
-
removeLineNumber
public void removeLineNumber(LineNumberGen l)
-
removeLineNumbers
public void removeLineNumbers()
-
getLineNumbers
public LineNumberGen[] getLineNumbers()
-
getLineNumberTable
public LineNumberTable getLineNumberTable(ConstantPool cp)
-
addExceptionHandler
public CodeExceptionGen addExceptionHandler(InstructionHandle start_pc, InstructionHandle end_pc, InstructionHandle handler_pc, ObjectType catch_type)
-
removeExceptionHandler
public void removeExceptionHandler(CodeExceptionGen c)
-
removeExceptionHandlers
public void removeExceptionHandlers()
-
getExceptionHandlers
public CodeExceptionGen[] getExceptionHandlers()
-
addException
public void addException(String class_name)
-
removeException
public void removeException(String c)
-
removeExceptions
public void removeExceptions()
-
getExceptions
public String[] getExceptions()
-
addCodeAttribute
public void addCodeAttribute(Attribute a)
-
addParameterAnnotationsAsAttribute
public void addParameterAnnotationsAsAttribute(ConstantPool cp)
-
removeCodeAttribute
public void removeCodeAttribute(Attribute a)
-
removeCodeAttributes
public void removeCodeAttributes()
-
getCodeAttributes
public Attribute[] getCodeAttributes()
-
getMethod
public Method getMethod()
-
setMaxLocals
public void setMaxLocals(int m)
-
getMaxLocals
public int getMaxLocals()
-
setMaxStack
public void setMaxStack(int m)
-
getMaxStack
public int getMaxStack()
-
getClassName
public String getClassName()
-
setClassName
public void setClassName(String class_name)
-
setReturnType
public void setReturnType(Type return_type)
-
getReturnType
public Type getReturnType()
-
setArgumentTypes
public void setArgumentTypes(Type[] arg_types)
-
getArgumentTypes
public Type[] getArgumentTypes()
-
setArgumentType
public void setArgumentType(int i, Type type)
-
getArgumentType
public Type getArgumentType(int i)
-
setArgumentNames
public void setArgumentNames(String[] arg_names)
-
getArgumentNames
public String[] getArgumentNames()
-
setArgumentName
public void setArgumentName(int i, String name)
-
getArgumentName
public String getArgumentName(int i)
-
getInstructionList
public InstructionList getInstructionList()
-
setInstructionList
public void setInstructionList(InstructionList il)
-
getSignature
public String getSignature()
- Specified by:
getSignaturein classFieldGenOrMethodGen
-
setMaxStack
public void setMaxStack()
-
setMaxLocals
public void setMaxLocals()
-
setMaxLocals
public void setMaxLocals(boolean respectLocalVariableTable)
-
stripAttributes
public void stripAttributes(boolean flag)
-
getMaxStack
public static int getMaxStack(ConstantPool cp, InstructionList il, CodeExceptionGen[] et)
-
getAnnotationsOnParameter
public List<AnnotationGen> getAnnotationsOnParameter(int i)
-
addParameterAnnotation
public void addParameterAnnotation(int parameterIndex, AnnotationGen annotation)
-
-