Package org.jboss.byteman.rule.compiler
Class CompileContext
- java.lang.Object
-
- org.jboss.byteman.rule.compiler.CompileContext
-
public class CompileContext extends java.lang.Object
class which retains compiler state during recursive compilation of rule expressions to bytecode
-
-
Field Summary
Fields Modifier and Type Field Description private int
localCount
private int
localMax
private org.objectweb.asm.MethodVisitor
mv
private int
sourceLine
private int
stackCount
private int
stackMax
-
Constructor Summary
Constructors Constructor Description CompileContext(org.objectweb.asm.MethodVisitor mv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
getLocalCount()
int
getLocalMax()
int
getSourceLine()
int
getStackCount()
int
getStackMax()
void
notifySourceEnd()
void
notifySourceLine(int line)
-
-
-
Method Detail
-
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()
-
compileUnbox
public 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 type- Parameters:
fromType
- the type of the value to be unboxedtoType
- he type required after unboxing
-
compileBox
public void compileBox(Type toType)
box a value belonging to a primitive type- Parameters:
toType
- the type required after boxing
-
compilePrimitiveConversion
public void compilePrimitiveConversion(Type fromType, Type toType)
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
-
compileCheckCast
public void compileCheckCast(Type toType)
-
-