|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bcel.classfile.AccessFlags
org.apache.bcel.generic.FieldGenOrMethodGen
org.apache.bcel.generic.MethodGen
org.apache.xalan.xsltc.compiler.util.MethodGenerator
public class MethodGenerator
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.bcel.generic.InstructionConstants |
---|
org.apache.bcel.generic.InstructionConstants.Clinit |
Field Summary |
---|
Fields inherited from interface org.apache.bcel.generic.InstructionConstants |
---|
AALOAD, AASTORE, ACONST_NULL, ALOAD_0, ALOAD_1, ALOAD_2, ARETURN, ARRAYLENGTH, ASTORE_0, ASTORE_1, ASTORE_2, ATHROW, BALOAD, BASTORE, bla, CALOAD, CASTORE, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DMUL, DNEG, DREM, DRETURN, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FMUL, FNEG, FREM, FRETURN, FSUB, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, ILOAD_0, ILOAD_1, ILOAD_2, IMUL, INEG, INSTRUCTIONS, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE_0, ISTORE_1, ISTORE_2, ISUB, IUSHR, IXOR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDIV, LMUL, LNEG, LOR, LREM, LRETURN, LSHL, LSHR, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, NOP, POP, POP2, RETURN, SALOAD, SASTORE, SWAP, THIS |
Constructor Summary | |
---|---|
MethodGenerator(int access_flags,
org.apache.bcel.generic.Type return_type,
org.apache.bcel.generic.Type[] arg_types,
java.lang.String[] arg_names,
java.lang.String method_name,
java.lang.String class_name,
org.apache.bcel.generic.InstructionList il,
org.apache.bcel.generic.ConstantPoolGen cpg)
|
Method Summary | |
---|---|
void |
addInstructionList(Pattern pattern,
org.apache.bcel.generic.InstructionList ilist)
Add a pre-compiled pattern to this mode. |
org.apache.bcel.generic.LocalVariableGen |
addLocalVariable(java.lang.String name,
org.apache.bcel.generic.Type type,
org.apache.bcel.generic.InstructionHandle start,
org.apache.bcel.generic.InstructionHandle end)
Allocates a local variable. |
org.apache.bcel.generic.LocalVariableGen |
addLocalVariable2(java.lang.String name,
org.apache.bcel.generic.Type type,
org.apache.bcel.generic.InstructionHandle start)
|
org.apache.bcel.generic.Instruction |
attribute()
|
org.apache.bcel.generic.Instruction |
endDocument()
|
org.apache.bcel.generic.Instruction |
endElement()
|
org.apache.bcel.generic.InstructionList |
getInstructionList(Pattern pattern)
Get the instruction list for a pre-compiled pattern. |
int |
getLocalIndex(java.lang.String name)
|
org.apache.bcel.generic.LocalVariableGen |
getLocalVariable(java.lang.String name)
|
org.apache.bcel.generic.Instruction |
loadContextNode()
by default context node is the same as current node. |
org.apache.bcel.generic.Instruction |
loadCurrentNode()
|
org.apache.bcel.generic.Instruction |
loadDOM()
|
org.apache.bcel.generic.Instruction |
loadHandler()
|
org.apache.bcel.generic.Instruction |
loadIterator()
|
void |
markChunkEnd()
Mark the end of an outlineable chunk of code. |
void |
markChunkStart()
Mark the end of the method's InstructionList as the start of an outlineable chunk of code. |
org.apache.bcel.generic.Instruction |
namespace()
|
org.apache.bcel.generic.Instruction |
nextNode()
|
org.apache.bcel.classfile.Method[] |
outlineChunks(ClassGenerator classGen,
int originalMethodSize)
Breaks up the IL for this MethodGenerator into separate
outlined methods so that no method exceeds the 64KB limit on the length
of the byte code associated with a method. |
void |
removeLocalVariable(org.apache.bcel.generic.LocalVariableGen lvg)
|
org.apache.bcel.generic.Instruction |
reset()
|
void |
setMaxLocals()
|
org.apache.bcel.generic.Instruction |
setStartNode()
|
org.apache.bcel.generic.Instruction |
startDocument()
|
org.apache.bcel.generic.Instruction |
startElement()
|
org.apache.bcel.generic.Instruction |
storeContextNode()
|
org.apache.bcel.generic.Instruction |
storeCurrentNode()
|
org.apache.bcel.generic.Instruction |
storeDOM()
|
org.apache.bcel.generic.Instruction |
storeHandler()
|
org.apache.bcel.generic.Instruction |
storeIterator()
|
org.apache.bcel.generic.Instruction |
uniqueAttribute()
|
Methods inherited from class org.apache.bcel.generic.MethodGen |
---|
addCodeAttribute, addException, addExceptionHandler, addLineNumber, addLocalVariable, addObserver, copy, equals, getArgumentName, getArgumentNames, getArgumentType, getArgumentTypes, getClassName, getCodeAttributes, getComparator, getExceptionHandlers, getExceptions, getInstructionList, getLineNumbers, getLineNumberTable, getLocalVariables, getLocalVariableTable, getMaxLocals, getMaxStack, getMaxStack, getMethod, getReturnType, getSignature, hashCode, removeCodeAttribute, removeCodeAttributes, removeException, removeExceptionHandler, removeExceptionHandlers, removeExceptions, removeLineNumber, removeLineNumbers, removeLocalVariables, removeNOPs, removeObserver, setArgumentName, setArgumentNames, setArgumentType, setArgumentTypes, setClassName, setComparator, setInstructionList, setMaxLocals, setMaxStack, setMaxStack, setReturnType, stripAttributes, toString, update |
Methods inherited from class org.apache.bcel.generic.FieldGenOrMethodGen |
---|
addAttribute, clone, getAttributes, getConstantPool, getName, getType, removeAttribute, removeAttributes, setConstantPool, setName, setType |
Methods inherited from class org.apache.bcel.classfile.AccessFlags |
---|
getAccessFlags, getModifiers, isAbstract, isAbstract, isAnnotation, isAnnotation, isEnum, isEnum, isFinal, isFinal, isInterface, isInterface, isNative, isNative, isPrivate, isPrivate, isProtected, isProtected, isPublic, isPublic, isStatic, isStatic, isStrictfp, isStrictfp, isSynchronized, isSynchronized, isSynthetic, isSynthetic, isTransient, isTransient, isVolatile, isVolatile, setAccessFlags, setModifiers |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MethodGenerator(int access_flags, org.apache.bcel.generic.Type return_type, org.apache.bcel.generic.Type[] arg_types, java.lang.String[] arg_names, java.lang.String method_name, java.lang.String class_name, org.apache.bcel.generic.InstructionList il, org.apache.bcel.generic.ConstantPoolGen cpg)
Method Detail |
---|
public org.apache.bcel.generic.LocalVariableGen addLocalVariable(java.lang.String name, org.apache.bcel.generic.Type type, org.apache.bcel.generic.InstructionHandle start, org.apache.bcel.generic.InstructionHandle end)
addLocalVariable
in class org.apache.bcel.generic.MethodGen
public org.apache.bcel.generic.LocalVariableGen addLocalVariable2(java.lang.String name, org.apache.bcel.generic.Type type, org.apache.bcel.generic.InstructionHandle start)
public void removeLocalVariable(org.apache.bcel.generic.LocalVariableGen lvg)
removeLocalVariable
in class org.apache.bcel.generic.MethodGen
public org.apache.bcel.generic.Instruction loadDOM()
public org.apache.bcel.generic.Instruction storeDOM()
public org.apache.bcel.generic.Instruction storeHandler()
public org.apache.bcel.generic.Instruction loadHandler()
public org.apache.bcel.generic.Instruction storeIterator()
public org.apache.bcel.generic.Instruction loadIterator()
public final org.apache.bcel.generic.Instruction setStartNode()
public final org.apache.bcel.generic.Instruction reset()
public final org.apache.bcel.generic.Instruction nextNode()
public final org.apache.bcel.generic.Instruction startElement()
public final org.apache.bcel.generic.Instruction endElement()
public final org.apache.bcel.generic.Instruction startDocument()
public final org.apache.bcel.generic.Instruction endDocument()
public final org.apache.bcel.generic.Instruction attribute()
public final org.apache.bcel.generic.Instruction uniqueAttribute()
public final org.apache.bcel.generic.Instruction namespace()
public org.apache.bcel.generic.Instruction loadCurrentNode()
public org.apache.bcel.generic.Instruction storeCurrentNode()
public org.apache.bcel.generic.Instruction loadContextNode()
public org.apache.bcel.generic.Instruction storeContextNode()
public int getLocalIndex(java.lang.String name)
public org.apache.bcel.generic.LocalVariableGen getLocalVariable(java.lang.String name)
public void setMaxLocals()
setMaxLocals
in class org.apache.bcel.generic.MethodGen
public void addInstructionList(Pattern pattern, org.apache.bcel.generic.InstructionList ilist)
public org.apache.bcel.generic.InstructionList getInstructionList(Pattern pattern)
public org.apache.bcel.classfile.Method[] outlineChunks(ClassGenerator classGen, int originalMethodSize)
MethodGenerator
into separate
outlined methods so that no method exceeds the 64KB limit on the length
of the byte code associated with a method.
classGen
- The ClassGen
with which the generated methods
will be associatedoriginalMethodSize
- The number of bytes of bytecode represented by
the InstructionList
of this method
Method
s and the original
method itselfpublic void markChunkStart()
InstructionList
as the start of an outlineable chunk of code.
The outlineable chunk begins after the InstructionHandle
that is
at the end of the method's InstructionList
, or at the start of
the method if the InstructionList
is empty.
See OutlineableChunkStart
for more information.
public void markChunkEnd()
OutlineableChunkStart
for more information.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |