Package org.jboss.byteman.rule.compiler
Class CompileContext
- java.lang.Object
-
- org.jboss.byteman.rule.compiler.CompileContext
-
public class CompileContext extends java.lang.Objectclass which retains compiler state during recursive compilation of rule expressions to bytecode
-
-
Field Summary
Fields Modifier and Type Field Description private intlocalCountprivate intlocalMaxprivate org.objectweb.asm.MethodVisitormvprivate intsourceLineprivate intstackCountprivate intstackMax
-
Constructor Summary
Constructors Constructor Description CompileContext(org.objectweb.asm.MethodVisitor mv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLocalCount(int count)voidaddStackCount(int count)voidcompileBooleanConversion(Type fromType, Type toType)voidcompileBox(Type toType)box a value belonging to a primitive typevoidcompileCheckCast(Type toType)voidcompileNumericConversion(Type fromType, Type toType)voidcompileObjectConversion(Type fromType, Type toType)voidcompilePrimitiveConversion(Type fromType, Type toType)compile code to convert a numeric or character primitive to a numeric or character primitivevoidcompileStringConversion(Type fromType, Type toType)voidcompileTypeConversion(Type fromType, Type toType)voidcompileUnbox(Type fromType, Type toType)compile code to convert a value of a boxed type to a primitive type, possibly not the immediately related primitive typeintgetLocalCount()intgetLocalMax()intgetSourceLine()intgetStackCount()intgetStackMax()voidnotifySourceEnd()voidnotifySourceLine(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)
-
-