Class Transpiler
java.lang.Object
ortus.boxlang.compiler.asmboxpiler.Transpiler
- All Implemented Interfaces:
ITranspiler
- Direct Known Subclasses:
AsmTranspiler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBoxStaticInitializer
(BoxStaticInitializer staticInitializer) void
addImport
(BoxExpression expression, BoxIdentifier alias) void
addMethodContextTracker
(MethodContextTracker methodContextTracker) void
addTryCatchBlock
(org.objectweb.asm.tree.TryCatchBlockNode tryCatchBlockNode) void
addUDFRegistration
(String name, List<org.objectweb.asm.tree.AbstractInsnNode> nodes) boolean
void
List
<org.objectweb.asm.tree.AbstractInsnNode> List
<org.objectweb.asm.tree.AbstractInsnNode> createKey
(BoxExpression expr) void
void
int
getKeys()
org.objectweb.asm.tree.ClassNode
getProperty
(String key) Get a Propoertystatic Transpiler
List
<org.objectweb.asm.tree.TryCatchBlockNode> List
<org.objectweb.asm.tree.AbstractInsnNode> boolean
hasCompiledFunction
(String name) int
void
void
boolean
boolean
matchesImport
(String token) void
int
registerKey
(BoxExpression key) void
setAuxiliary
(String name, org.objectweb.asm.tree.ClassNode classNode) void
setComponentCounter
(int counter) void
setOwningClass
(org.objectweb.asm.tree.ClassNode node) void
setProperty
(String key, String value) Set a propertyList
<org.objectweb.asm.tree.AbstractInsnNode> transform
(BoxNode node, TransformerContext context) abstract List
<org.objectweb.asm.tree.AbstractInsnNode> transform
(BoxNode node, TransformerContext context, ReturnValueContext returnValueContext) List
<org.objectweb.asm.tree.AbstractInsnNode> transformAnnotations
(List<BoxAnnotation> annotations) List
<org.objectweb.asm.tree.AbstractInsnNode> transformAnnotations
(List<BoxAnnotation> annotations, Boolean defaultTrue, boolean onlyLiteralValues) List
<org.objectweb.asm.tree.AbstractInsnNode> transformDocumentation
(List<BoxDocumentationAnnotation> documentation) transformProperties
(org.objectweb.asm.Type declaringType, List<BoxProperty> properties, String sourceType) org.objectweb.asm.tree.ClassNode
transpile
(BoxInterface boxClass) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ortus.boxlang.compiler.asmboxpiler.ITranspiler
transpile, transpile
-
Constructor Details
-
Transpiler
public Transpiler()
-
-
Method Details
-
setProperty
Set a property- Parameters:
key
- key of the Propertyvalue
- value of the Property
-
setOwningClass
public void setOwningClass(org.objectweb.asm.tree.ClassNode node) -
getOwningClass
public org.objectweb.asm.tree.ClassNode getOwningClass() -
canReturn
public boolean canReturn() -
incrementfunctionBodyCounter
public void incrementfunctionBodyCounter() -
decrementfunctionBodyCounter
public void decrementfunctionBodyCounter() -
isInsideComponent
public boolean isInsideComponent() -
getComponentCounter
public int getComponentCounter() -
setComponentCounter
public void setComponentCounter(int counter) -
incrementComponentCounter
public void incrementComponentCounter() -
decrementComponentCounter
public void decrementComponentCounter() -
transpile
- Throws:
BoxRuntimeException
-
getProperty
Get a Propoerty- Parameters:
key
- key of the Property- Returns:
- the value of the property or null if not defined
-
getTranspiler
-
transform
public List<org.objectweb.asm.tree.AbstractInsnNode> transform(BoxNode node, TransformerContext context) -
addUDFRegistration
-
hasCompiledFunction
-
getUDFRegistrations
-
transform
public abstract List<org.objectweb.asm.tree.AbstractInsnNode> transform(BoxNode node, TransformerContext context, ReturnValueContext returnValueContext) -
registerKey
-
getKeys
-
getCurrentMethodContextTracker
-
addMethodContextTracker
-
popMethodContextTracker
public void popMethodContextTracker() -
getTryCatchStack
-
addTryCatchBlock
public void addTryCatchBlock(org.objectweb.asm.tree.TryCatchBlockNode tryCatchBlockNode) -
clearTryCatchStack
public void clearTryCatchStack() -
addBoxStaticInitializer
-
getBoxStaticInitializers
-
getAuxiliary
-
setAuxiliary
-
incrementAndGetLambdaCounter
public int incrementAndGetLambdaCounter() -
createKey
-
transformProperties
public abstract List<List<org.objectweb.asm.tree.AbstractInsnNode>> transformProperties(org.objectweb.asm.Type declaringType, List<BoxProperty> properties, String sourceType) -
createKey
-
transformDocumentation
public List<org.objectweb.asm.tree.AbstractInsnNode> transformDocumentation(List<BoxDocumentationAnnotation> documentation) -
transformAnnotations
public List<org.objectweb.asm.tree.AbstractInsnNode> transformAnnotations(List<BoxAnnotation> annotations, Boolean defaultTrue, boolean onlyLiteralValues) -
transformAnnotations
public List<org.objectweb.asm.tree.AbstractInsnNode> transformAnnotations(List<BoxAnnotation> annotations) -
addImport
-
getImports
-
matchesImport
-