MethodGenerator
public MethodGenerator(int access_flags,
Type return_type,
Type[] arg_types,
String[] arg_names,
String method_name,
String class_name,
InstructionList il,
ConstantPoolGen cpg)
addInstructionList
public void addInstructionList(Pattern pattern,
InstructionList ilist)
Add a pre-compiled pattern to this mode.
addLocalVariable
public LocalVariableGen addLocalVariable(String name,
Type type,
InstructionHandle start,
InstructionHandle end)
Allocates a local variable. If the slot allocator has already been
initialized, then call addLocalVariable2() so that the new variable
is known to the allocator. Failing to do this may cause the allocator
to return a slot that is already in use.
addLocalVariable2
public LocalVariableGen addLocalVariable2(String name,
Type type,
InstructionHandle start)
attribute
public final Instruction attribute()
endDocument
public final Instruction endDocument()
endElement
public final Instruction endElement()
getInstructionList
public InstructionList getInstructionList(Pattern pattern)
Get the instruction list for a pre-compiled pattern. Used by
test sequences to avoid compiling patterns more than once.
getLocalIndex
public int getLocalIndex(String name)
getLocalVariable
public LocalVariableGen getLocalVariable(String name)
loadContextNode
public Instruction loadContextNode()
by default context node is the same as current node. MK437
loadCurrentNode
public Instruction loadCurrentNode()
loadDOM
public Instruction loadDOM()
loadHandler
public Instruction loadHandler()
loadIterator
public Instruction loadIterator()
markChunkEnd
public void markChunkEnd()
Mark the end of an outlineable chunk of code. See
OutlineableChunkStart
for more information.
markChunkStart
public void markChunkStart()
Mark the end of the method's
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.
namespace
public final Instruction namespace()
nextNode
public final Instruction nextNode()
outlineChunks
public 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.
classGen
- The ClassGen
with which the generated methods
will be associatedoriginalMethodSize
- The number of bytes of bytecode represented by
the InstructionList
of this method
- an array of the outlined
Method
s and the original
method itself
removeLocalVariable
public void removeLocalVariable(LocalVariableGen lvg)
reset
public final Instruction reset()
setMaxLocals
public void setMaxLocals()
setStartNode
public final Instruction setStartNode()
startDocument
public final Instruction startDocument()
startElement
public final Instruction startElement()
storeContextNode
public Instruction storeContextNode()
storeCurrentNode
public Instruction storeCurrentNode()
storeDOM
public Instruction storeDOM()
storeHandler
public Instruction storeHandler()
storeIterator
public Instruction storeIterator()
uniqueAttribute
public final Instruction uniqueAttribute()