public final class ByteCodeUtility extends Object
Constructor and Description |
---|
ByteCodeUtility(org.glassfish.pfl.objectweb.asm.ClassWriter cw,
ClassGeneratorImpl cg) |
ByteCodeUtility(org.glassfish.pfl.objectweb.asm.ClassWriter cw,
ClassGeneratorImpl cg,
boolean debug,
PrintStream ps)
Construct an instance of ByteCodeUtility from an ASM ClassWriter
and a codegen ClassGeneratorImpl.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(FieldGenerator arg) |
void |
callEmitter(EmitterFactory.Emitter emitter) |
void |
emitArrayStore() |
void |
emitBinaryOperator(ExpressionFactory.BinaryOperatorExpression arg) |
void |
emitBranch(MyLabel target) |
void |
emitCast(Type from,
Type to) |
void |
emitConditionalBranch(MyLabel falseBranch) |
void |
emitConstantExpression(Type type,
Object value) |
void |
emitConversion(Type from,
Type to) |
void |
emitDup() |
void |
emitExceptionTableEntry(org.glassfish.pfl.objectweb.asm.Label start,
org.glassfish.pfl.objectweb.asm.Label end,
org.glassfish.pfl.objectweb.asm.Label handler,
Type exceptionType) |
void |
emitInstanceof(Type type) |
void |
emitInvoke(Type type,
String name,
Signature sig)
Emit the appropriate non-static INVOKE instruction as follows:
If type is an interface, emit INVOKEINTERFACE.
|
void |
emitJsr(org.glassfish.pfl.objectweb.asm.Label label) |
void |
emitLabel(Attribute<MyLabel> attr,
Node node) |
void |
emitMethodEnd(MethodGenerator mg,
org.glassfish.pfl.objectweb.asm.Label returnLabel,
Variable returnVariable,
boolean dump) |
void |
emitMethodStart(MethodGenerator mg) |
void |
emitNewArrayCall(Type type) |
void |
emitNewCall(Type type)
Emit the NEW, DUP sequence required at the start of a new
call.
|
void |
emitNewInvoke(Type type,
Signature sig)
Emit the INVOKESPECIAL instruction for calling a constructor
with the given signature.
|
void |
emitPop() |
void |
emitRet(Variable var) |
void |
emitSpecialInvoke(Type type,
String name,
Signature sig)
Emit the INVOKESPECIAL instruction for calling a method
with the given signature.
|
void |
emitStaticInvoke(Type type,
String name,
Signature sig)
Emit a static INVOKE instruction.
|
void |
emitThisExpression() |
void |
emitThrow() |
int |
typeCode(Type type) |
public ByteCodeUtility(org.glassfish.pfl.objectweb.asm.ClassWriter cw, ClassGeneratorImpl cg, boolean debug, PrintStream ps)
public ByteCodeUtility(org.glassfish.pfl.objectweb.asm.ClassWriter cw, ClassGeneratorImpl cg)
public void addField(FieldGenerator arg)
public void emitMethodStart(MethodGenerator mg)
public void emitMethodEnd(MethodGenerator mg, org.glassfish.pfl.objectweb.asm.Label returnLabel, Variable returnVariable, boolean dump)
public void emitRet(Variable var)
public void emitThisExpression()
public void emitConditionalBranch(MyLabel falseBranch)
public void emitBranch(MyLabel target)
public void emitNewCall(Type type)
public void emitInstanceof(Type type)
public void emitDup()
public void emitArrayStore()
public int typeCode(Type type)
public void emitNewArrayCall(Type type)
public void emitStaticInvoke(Type type, String name, Signature sig)
public void emitInvoke(Type type, String name, Signature sig)
public void emitNewInvoke(Type type, Signature sig)
public void emitSpecialInvoke(Type type, String name, Signature sig)
public void emitThrow()
public void emitExceptionTableEntry(org.glassfish.pfl.objectweb.asm.Label start, org.glassfish.pfl.objectweb.asm.Label end, org.glassfish.pfl.objectweb.asm.Label handler, Type exceptionType)
public void emitJsr(org.glassfish.pfl.objectweb.asm.Label label)
public void callEmitter(EmitterFactory.Emitter emitter)
public void emitPop()
public void emitBinaryOperator(ExpressionFactory.BinaryOperatorExpression arg)
Copyright © 2017 Oracle. All rights reserved.