Package org.jboss.byteman.rule.compiler
Class CompileContext
java.lang.Object
org.jboss.byteman.rule.compiler.CompileContext
class which retains compiler state during recursive compilation of rule expressions to bytecode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private int
private org.objectweb.asm.MethodVisitor
private int
private int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLocalCount
(int count) void
addStackCount
(int count) void
compileBooleanConversion
(Type fromType, Type toType) void
compileBox
(Type toType) box a value belonging to a primitive typevoid
compileCheckCast
(Type toType) void
compileNumericConversion
(Type fromType, Type toType) void
compileObjectConversion
(Type fromType, Type toType) void
compilePrimitiveConversion
(Type fromType, Type toType) compile code to convert a numeric or character primitive to a numeric or character primitivevoid
compileStringConversion
(Type fromType, Type toType) void
compileTypeConversion
(Type fromType, Type toType) void
compileUnbox
(Type fromType, Type toType) compile code to convert a value of a boxed type to a primitive type, possibly not the immediately related primitive typeint
int
int
int
int
void
void
notifySourceLine
(int line)
-
Field Details
-
sourceLine
private int sourceLine -
stackCount
private int stackCount -
stackMax
private int stackMax -
localCount
private int localCount -
localMax
private int localMax -
mv
private org.objectweb.asm.MethodVisitor mv
-
-
Constructor Details
-
CompileContext
CompileContext(org.objectweb.asm.MethodVisitor mv)
-
-
Method Details
-
getSourceLine
public int getSourceLine() -
getStackCount
public int getStackCount() -
getLocalCount
public int getLocalCount() -
getStackMax
public int getStackMax() -
getLocalMax
public int getLocalMax() -
addStackCount
public void addStackCount(int count) -
addLocalCount
public void addLocalCount(int count) -
notifySourceLine
public void notifySourceLine(int line) -
notifySourceEnd
public void notifySourceEnd() -
compileTypeConversion
-
compileNumericConversion
-
compileUnbox
compile code to convert a value of a boxed type to a primitive type, possibly not the immediately related primitive type- Parameters:
fromType
- the type of the value to be unboxedtoType
- he type required after unboxing
-
compileBox
box a value belonging to a primitive type- Parameters:
toType
- the type required after boxing
-
compileStringConversion
-
compilePrimitiveConversion
compile code to convert a numeric or character primitive to a numeric or character primitive- Parameters:
fromType
- the type of the value to be convertedtoType
- the type required after conversion
-
compileBooleanConversion
-
compileObjectConversion
-
compileCheckCast
-