Class ASMUtil
java.lang.Object
org.glassfish.pfl.dynamic.codegen.impl.ASMUtil
Simple class containing a few ASM-related utilities
and dynamic attributes needs for the byte code generator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
static class
static enum
static class
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static Attribute
<EmitterFactory.Emitter> (package private) static Attribute
<EmitterFactory.Emitter> (package private) static Attribute
<BlockStatement> (package private) static Attribute
<ASMUtil.LineNumberTable> private static NullaryFunction
<MyLabel> (package private) static Attribute
<ASMUtil.RequiredEmitterType> (package private) static Attribute
<EmitterFactory.Emitter> private static NullaryFunction
<ASMUtil.LineNumberTable> (package private) static Attribute
<ASMUtil.VariablesInMethod> private static NullaryFunction
<ASMUtil.VariablesInMethod> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
private static void
displayNode
(PrintStream ps, String msg, Node node) private static byte[]
fixStackSize
(byte[] code) static byte[]
generate
(ClassLoader cl, ClassGeneratorImpl cg, ImportList imports, Properties options, PrintStream debugOutput) Given a completed ClassGeneratorImpl, use ASM to construct the byte array representing the compiled class.static void
generateSourceCode
(PrintStream ps, ClassGeneratorImpl cg, ImportList imports, Properties options) static void
generateSourceCode
(String sourceGenDir, ClassGeneratorImpl cg, ImportList imports, Properties options) static File
private static void
verify
(PrintStream ps, byte[] classData)
-
Field Details
-
makeLabel
-
returnLabel
-
statementStartLabel
-
statementEndLabel
-
throwEndLabel
-
next
-
returnVariable
-
stackFrameSlot
-
getEmitter
-
setEmitter
-
emitter
-
requiredEmitterType
-
lastStatement
-
uncaughtException
-
returnAddress
-
lastBlock
-
uncaughtExceptionHandler
-
ctr
-
tableMaker
-
lineNumberTable
-
vmMaker
-
variablesInMethod
-
-
Constructor Details
-
ASMUtil
public ASMUtil()
-
-
Method Details
-
bcName
-
displayNode
-
generateSourceCode
public static void generateSourceCode(PrintStream ps, ClassGeneratorImpl cg, ImportList imports, Properties options) throws IOException - Throws:
IOException
-
getFile
-
generateSourceCode
public static void generateSourceCode(String sourceGenDir, ClassGeneratorImpl cg, ImportList imports, Properties options) throws IOException - Throws:
IOException
-
fixStackSize
private static byte[] fixStackSize(byte[] code) -
generate
public static byte[] generate(ClassLoader cl, ClassGeneratorImpl cg, ImportList imports, Properties options, PrintStream debugOutput) Given a completed ClassGeneratorImpl, use ASM to construct the byte array representing the compiled class. -
verify
-