Method | Description | |
---|---|---|
AcquireLabel ( ) : int | ||
Add ( int theOpCode ) : void |
Add the single-byte opcode to the current method. Add the single-byte opcode to the current method. |
|
Add ( int theOpCode, int theOperand ) : void |
Add a single-operand opcode to the current method. Add a single-operand opcode to the current method. |
|
Add ( int theOpCode, int theOperand1, int theOperand2 ) : void |
Add the given two-operand bytecode to the current method. Add the given two-operand bytecode to the current method. |
|
Add ( int theOpCode, string className ) : void | ||
Add ( int theOpCode, string className, string fieldName, string fieldType ) : void | ||
AddALoad ( int local ) : void |
Load object from the given local into stack. Load object from the given local into stack. |
|
AddAStore ( int local ) : void |
Store object from stack top into the given local. Store object from stack top into the given local. |
|
AddDLoad ( int local ) : void |
Load double from the given local into stack. Load double from the given local into stack. |
|
AddDStore ( int local ) : void |
Store double from stack top into the given local. Store double from stack top into the given local. |
|
AddExceptionHandler ( int startLabel, int endLabel, int handlerLabel, string catchClassName ) : void | ||
AddFLoad ( int local ) : void |
Load float from the given local into stack. Load float from the given local into stack. |
|
AddFStore ( int local ) : void |
Store float from stack top into the given local. Store float from stack top into the given local. |
|
AddField ( string fieldName, string type, short flags ) : void |
Add a field to the class. Add a field to the class. |
|
AddField ( string fieldName, string type, short flags, double value ) : void |
Add a field to the class. Add a field to the class. |
|
AddField ( string fieldName, string type, short flags, int value ) : void |
Add a field to the class. Add a field to the class. |
|
AddField ( string fieldName, string type, short flags, long value ) : void |
Add a field to the class. Add a field to the class. |
|
AddILoad ( int local ) : void |
Load integer from the given local into stack. Load integer from the given local into stack. |
|
AddIStore ( int local ) : void |
Store integer from stack top into the given local. Store integer from stack top into the given local. |
|
AddInterface ( string interfaceName ) : void |
Add an interface implemented by this class. Add an interface implemented by this class. This method may be called multiple times for classes that implement multiple interfaces. |
|
AddInvoke ( int theOpCode, string className, string methodName, string methodType ) : void | ||
AddLLoad ( int local ) : void |
Load long from the given local into stack. Load long from the given local into stack. |
|
AddLStore ( int local ) : void |
Store long from stack top into the given local. Store long from stack top into the given local. |
|
AddLineNumberEntry ( short lineNumber ) : void | ||
AddLoadConstant ( double k ) : void |
Generate the load constant bytecode for the given double. Generate the load constant bytecode for the given double. |
|
AddLoadConstant ( float k ) : void |
Generate the load constant bytecode for the given float. Generate the load constant bytecode for the given float. |
|
AddLoadConstant ( int k ) : void |
Generate the load constant bytecode for the given integer. Generate the load constant bytecode for the given integer. |
|
AddLoadConstant ( long k ) : void |
Generate the load constant bytecode for the given long. Generate the load constant bytecode for the given long. |
|
AddLoadConstant ( string k ) : void |
Generate the load constant bytecode for the given string. Generate the load constant bytecode for the given string. |
|
AddLoadThis ( ) : void |
Load "this" into stack. Load "this" into stack. |
|
AddPush ( bool k ) : void | ||
AddPush ( double k ) : void |
Generate code to load the given double on stack. Generate code to load the given double on stack. |
|
AddPush ( int k ) : void |
Generate code to load the given integer on stack. Generate code to load the given integer on stack. |
|
AddPush ( long k ) : void |
Generate code to load the given long on stack. Generate code to load the given long on stack. |
|
AddPush ( string k ) : void |
Generate the code to leave on stack the given string even if the string encoding exeeds the class file limit for single string constant
|
|
AddTableSwitch ( int low, int high ) : int | ||
AddVariableDescriptor ( string name, string type, int startPC, int register ) : void |
Add Information about java variable to use when generating the local variable table. Add Information about java variable to use when generating the local variable table. |
|
AdjustStackTop ( int delta ) : void | ||
ClassFileWriter ( string className, string superClassName, string sourceFileName ) : System |
Construct a ClassFileWriter for a class. Construct a ClassFileWriter for a class. |
|
ClassNameToSignature ( string name ) : string |
Convert Java class name in dot notation into "Lname-with-dots-replaced-by-slashes;" form suitable for use as JVM type signatures. Convert Java class name in dot notation into "Lname-with-dots-replaced-by-slashes;" form suitable for use as JVM type signatures. |
|
GetClassName ( ) : string | ||
GetCurrentCodeOffset ( ) : int |
Get the current offset into the code of the current method. Get the current offset into the code of the current method. |
|
GetLabelPC ( int label ) : int | ||
GetStackTop ( ) : short | ||
IsUnderStringSizeLimit ( string k ) : bool |
Check if k fits limit on string constant size imposed by class file format. Check if k fits limit on string constant size imposed by class file format. |
|
MarkHandler ( int theLabel ) : void | ||
MarkLabel ( int label ) : void | ||
MarkLabel ( int label, short stackTop ) : void | ||
MarkTableSwitchCase ( int switchStart, int caseIndex ) : void | ||
MarkTableSwitchCase ( int switchStart, int caseIndex, int stackTop ) : void | ||
MarkTableSwitchDefault ( int switchStart ) : void | ||
SetFlags ( short flags ) : void |
Set the class's flags. Set the class's flags. Flags must be a set of the following flags, bitwise or'd together: ACC_PUBLIC ACC_PRIVATE ACC_PROTECTED ACC_FINAL ACC_ABSTRACT TODO: check that this is the appropriate set |
|
SetStackTop ( short n ) : void | ||
SetTableSwitchJump ( int switchStart, int caseIndex, int jumpTarget ) : void |
Set a jump case for a tableswitch instruction. Set a jump case for a tableswitch instruction. The jump target should be marked as a super block start for stack map generation. |
|
StartMethod ( string methodName, string type, short flags ) : void |
Add a method and begin adding code. Add a method and begin adding code. This method must be called before other methods for adding code, exception tables, etc. can be invoked. |
|
StopMethod ( short maxLocals ) : void |
Complete generation of the method. Complete generation of the method. After this method is called, no more code can be added to the method begun with |
|
ToByteArray ( ) : byte[] |
Get the class file as array of bytesto the OutputStream. Get the class file as array of bytesto the OutputStream. |
|
Write ( Stream oStream ) : void |
Write the class file to the OutputStream. Write the class file to the OutputStream. |
Method | Description | |
---|---|---|
AddLabelFixup ( int label, int fixupSite ) : void | ||
AddReservedCodeSpace ( int size ) : int | ||
AddSuperBlockStart ( int pc ) : void |
Add a pc as the start of super block. Add a pc as the start of super block. A pc is the beginning of a super block if: - pc == 0 - it is the target of a branch instruction - it is the beginning of an exception handler - it is directly after an unconditional jump |
|
AddToCodeBuffer ( int b ) : void | ||
AddToCodeInt16 ( int value ) : void | ||
ArrayTypeToName ( int type ) : char |
Convert a newarray operand into an internal type. Convert a newarray operand into an internal type. |
|
BadStack ( int value ) : void | ||
BytecodeStr ( int code ) : string | ||
ClassDescriptorToInternalName ( string descriptor ) : string |
Convert a class descriptor into an internal name. Convert a class descriptor into an internal name. For example, descriptor Ljava/lang/Object; becomes java/lang/Object. |
|
ClassFileWriter ( ) : System | ||
CreateInitialLocals ( ) : int[] |
Compute the initial local variable array for the current method. Compute the initial local variable array for the current method. Creates an array of the size of the method's max locals, regardless of the number of parameters in the method. |
|
DescriptorToInternalName ( string descriptor ) : string |
Convert a non-method type descriptor into an internal type. Convert a non-method type descriptor into an internal type. |
|
FinalizeSuperBlockStarts ( ) : void |
Sort the list of recorded super block starts and remove duplicates. Sort the list of recorded super block starts and remove duplicates. Also adds exception handling blocks as block starts, since there is no explicit control flow to these. Used for stack map table generation. |
|
FixLabelGotos ( ) : void | ||
GetCharBuffer ( int minimalSize ) : char[] | ||
GetSlashedForm ( string name ) : string | ||
GetWriteSize ( ) : int | ||
OpcodeCount ( int opcode ) : int |
Number of operands accompanying the opcode. Number of operands accompanying the opcode. |
|
OpcodeLength ( int opcode, bool wide ) : int |
Size of a bytecode instruction, counting the opcode and its operands. Size of a bytecode instruction, counting the opcode and its operands. This is different from opcodeCount, since opcodeCount counts logical operands. |
|
PutInt16 ( int value, byte array, int offset ) : int | ||
PutInt32 ( int value, byte array, int offset ) : int | ||
PutInt64 ( long value, byte array, int offset ) : int | ||
SizeOfParameters ( string pString ) : int | ||
StackChange ( int opcode ) : int |
The effect on the operand stack of a given opcode. The effect on the operand stack of a given opcode. |
|
Xop ( int shortOp, int op, int local ) : void |
public Add ( int theOpCode ) : void | ||
theOpCode | int | the opcode of the bytecode |
return | void |
public Add ( int theOpCode, int theOperand ) : void | ||
theOpCode | int | the opcode of the bytecode |
theOperand | int | the operand of the bytecode |
return | void |
public Add ( int theOpCode, int theOperand1, int theOperand2 ) : void | ||
theOpCode | int | the opcode of the bytecode |
theOperand1 | int | the first operand of the bytecode |
theOperand2 | int | the second operand of the bytecode |
return | void |
public Add ( int theOpCode, string className ) : void | ||
theOpCode | int | |
className | string | |
return | void |
public Add ( int theOpCode, string className, string fieldName, string fieldType ) : void | ||
theOpCode | int | |
className | string | |
fieldName | string | |
fieldType | string | |
return | void |
public AddALoad ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddAStore ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddDLoad ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddDStore ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddExceptionHandler ( int startLabel, int endLabel, int handlerLabel, string catchClassName ) : void | ||
startLabel | int | |
endLabel | int | |
handlerLabel | int | |
catchClassName | string | |
return | void |
public AddFLoad ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddFStore ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddField ( string fieldName, string type, short flags ) : void | ||
fieldName | string | the name of the field |
type | string | the type of the field using ... |
flags | short | /// the attributes of the field, such as ACC_PUBLIC, etc. /// bitwise or'd together /// |
return | void |
public AddField ( string fieldName, string type, short flags, double value ) : void | ||
fieldName | string | the name of the field |
type | string | the type of the field using ... |
flags | short | /// the attributes of the field, such as ACC_PUBLIC, etc. /// bitwise or'd together /// |
value | double | an initial double value |
return | void |
public AddField ( string fieldName, string type, short flags, int value ) : void | ||
fieldName | string | the name of the field |
type | string | the type of the field using ... |
flags | short | /// the attributes of the field, such as ACC_PUBLIC, etc. /// bitwise or'd together /// |
value | int | an initial integral value |
return | void |
public AddField ( string fieldName, string type, short flags, long value ) : void | ||
fieldName | string | the name of the field |
type | string | the type of the field using ... |
flags | short | /// the attributes of the field, such as ACC_PUBLIC, etc. /// bitwise or'd together /// |
value | long | an initial long value |
return | void |
public AddILoad ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddIStore ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddInterface ( string interfaceName ) : void | ||
interfaceName | string | /// a name of an interface implemented /// by the class being written, including full package /// qualification. /// |
return | void |
public AddInvoke ( int theOpCode, string className, string methodName, string methodType ) : void | ||
theOpCode | int | |
className | string | |
methodName | string | |
methodType | string | |
return | void |
public AddLLoad ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddLStore ( int local ) : void | ||
local | int | number of local register |
return | void |
public AddLineNumberEntry ( short lineNumber ) : void | ||
lineNumber | short | |
return | void |
public AddLoadConstant ( double k ) : void | ||
k | double | the constant |
return | void |
public AddLoadConstant ( float k ) : void | ||
k | float | the constant |
return | void |
public AddLoadConstant ( int k ) : void | ||
k | int | the constant |
return | void |
public AddLoadConstant ( long k ) : void | ||
k | long | the constant |
return | void |
public AddLoadConstant ( string k ) : void | ||
k | string | the constant |
return | void |
public AddTableSwitch ( int low, int high ) : int | ||
low | int | |
high | int | |
return | int |
public AddVariableDescriptor ( string name, string type, int startPC, int register ) : void | ||
name | string | variable name. |
type | string | variable type as bytecode descriptor string. |
startPC | int | /// the starting bytecode PC where this variable is live, /// or -1 if it does not have a Java register. /// |
register | int | /// the Java register number of variable /// or -1 if it does not have a Java register. /// |
return | void |
public ClassFileWriter ( string className, string superClassName, string sourceFileName ) : System | ||
className | string | /// the name of the class to write, including /// full package qualification. /// |
superClassName | string | /// the name of the superclass of the class /// to write, including full package qualification. /// |
sourceFileName | string | /// the name of the source file to use for /// producing debug information, or null if debug information /// is not desired /// |
return | System |
public static ClassNameToSignature ( string name ) : string | ||
name | string | |
return | string |
public IsUnderStringSizeLimit ( string k ) : bool | ||
k | string | the string constant |
return | bool |
public MarkLabel ( int label, short stackTop ) : void | ||
label | int | |
stackTop | short | |
return | void |
public MarkTableSwitchCase ( int switchStart, int caseIndex ) : void | ||
switchStart | int | |
caseIndex | int | |
return | void |
public MarkTableSwitchCase ( int switchStart, int caseIndex, int stackTop ) : void | ||
switchStart | int | |
caseIndex | int | |
stackTop | int | |
return | void |
public MarkTableSwitchDefault ( int switchStart ) : void | ||
switchStart | int | |
return | void |
public SetFlags ( short flags ) : void | ||
flags | short | the set of class flags to set |
return | void |
public SetTableSwitchJump ( int switchStart, int caseIndex, int jumpTarget ) : void | ||
switchStart | int | |
caseIndex | int | |
jumpTarget | int | |
return | void |
public StartMethod ( string methodName, string type, short flags ) : void | ||
methodName | string | the name of the method |
type | string | a string representing the type |
flags | short | /// the attributes of the field, such as ACC_PUBLIC, etc. /// bitwise or'd together /// |
return | void |
public StopMethod ( short maxLocals ) : void | ||
maxLocals | short | /// the maximum number of local variable slots /// (a.k.a. Java registers) used by the method /// |
return | void |
public Write ( Stream oStream ) : void | ||
oStream | Stream | the stream to write to |
return | void |