Package EDU.purdue.cs.bloat.reflect
Interface MethodInfo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectclone()Creates a clone of this MethodInfo except that its declaring class does not know about it.byte[]code()Get the byte code array of the method.ClassInfodeclaringClass()Returns the class which declared the method.Catch[]exceptionHandlers()Get the exception handlers in the method.int[]exceptionTypes()Get the indices into the constant pool of the types of the exceptions thrown by the method.LineNumberDebugInfo[]lineNumbers()Get the line number debug info of the instructions in the method.LocalDebugInfo[]locals()Get the local variable debug information for the method.intmaxLocals()Get the maximum number of locals used in the method.intmaxStack()Get the maximum height of the operand stack.intmodifiers()Get the modifiers of the method.intnameIndex()Returns the index into the constant pool of the name of the method.voidsetCode(byte[] code)Set the byte code array of the method.voidsetExceptionHandlers(Catch[] exceptions)Set the exception handlers in the method.voidsetLineNumbers(LineNumberDebugInfo[] lineNumbers)Set the line number debug info of the instructions in the method.voidsetLocals(LocalDebugInfo[] locals)Set the local variables in the method.voidsetMaxLocals(int maxLocals)Set the maximum number of locals used in the method.voidsetMaxStack(int maxStack)Set the maximum height of the operand stack.voidsetModifiers(int modifiers)Set the modifiers of the method.voidsetNameIndex(int index)Sets the index into the constant pool of the name of the method.voidsetTypeIndex(int index)Set the index into the constant pool of the type of the method.inttypeIndex()Returns the index into the constant pool of the type of the method.
-
-
-
Method Detail
-
declaringClass
ClassInfo declaringClass()
Returns the class which declared the method.
-
nameIndex
int nameIndex()
Returns the index into the constant pool of the name of the method.
-
typeIndex
int typeIndex()
Returns the index into the constant pool of the type of the method.
-
setNameIndex
void setNameIndex(int index)
Sets the index into the constant pool of the name of the method.
-
setTypeIndex
void setTypeIndex(int index)
Set the index into the constant pool of the type of the method.- Parameters:
index- The index into the constant pool of the type of the method.
-
setModifiers
void setModifiers(int modifiers)
Set the modifiers of the method. The values correspond to the constants in the Modifiers class.- Parameters:
modifiers- A bit vector of modifier flags for the method.- See Also:
Modifiers
-
modifiers
int modifiers()
Get the modifiers of the method. The values correspond to the constants in the Modifiers class.- Returns:
- A bit vector of modifier flags for the method.
- See Also:
Modifiers
-
exceptionTypes
int[] exceptionTypes()
Get the indices into the constant pool of the types of the exceptions thrown by the method.- Returns:
- The indices into the constant pool of the types of the exceptions thrown by the method.
-
maxStack
int maxStack()
Get the maximum height of the operand stack.- Returns:
- The maximum height of the operand stack.
-
setMaxStack
void setMaxStack(int maxStack)
Set the maximum height of the operand stack.- Parameters:
maxStack- The maximum height of the operand stack.
-
maxLocals
int maxLocals()
Get the maximum number of locals used in the method.- Returns:
- The maximum number of locals used in the method.
-
setMaxLocals
void setMaxLocals(int maxLocals)
Set the maximum number of locals used in the method.- Parameters:
maxLocals- The maximum number of locals used in the method.
-
code
byte[] code()
Get the byte code array of the method.- Returns:
- The byte code array of the method.
-
setCode
void setCode(byte[] code)
Set the byte code array of the method.- Parameters:
code- The byte code array of the method.
-
lineNumbers
LineNumberDebugInfo[] lineNumbers()
Get the line number debug info of the instructions in the method.- Returns:
- The line numbers of the instructions in the method. The array will be of size 0 if the method has no line number debug info.
-
setLineNumbers
void setLineNumbers(LineNumberDebugInfo[] lineNumbers)
Set the line number debug info of the instructions in the method.- Parameters:
lineNumbers- The line numbers of the instructions in the method. The array will be of size 0 if the method has no line number debug info.
-
locals
LocalDebugInfo[] locals()
Get the local variable debug information for the method.- Returns:
- The local variables in the method. The array will be of size 0 if the method has no local variable debug info.
-
setLocals
void setLocals(LocalDebugInfo[] locals)
Set the local variables in the method.- Parameters:
locals- The local variables in the method.
-
exceptionHandlers
Catch[] exceptionHandlers()
Get the exception handlers in the method.- Returns:
- The exception handlers in the method.
-
setExceptionHandlers
void setExceptionHandlers(Catch[] exceptions)
Set the exception handlers in the method.- Parameters:
exceptions- The exception handlers in the method.
-
clone
java.lang.Object clone()
Creates a clone of this MethodInfo except that its declaring class does not know about it.
-
-