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 TypeMethodDescriptionvoidaddBoxStaticInitializer(BoxStaticInitializer staticInitializer) voidaddImport(BoxExpression expression, BoxIdentifier alias) voidaddMethodContextTracker(MethodContextTracker methodContextTracker) voidaddTryCatchBlock(org.objectweb.asm.tree.TryCatchBlockNode tryCatchBlockNode) voidaddUDFRegistration(String name, List<org.objectweb.asm.tree.AbstractInsnNode> nodes) booleanvoidList<org.objectweb.asm.tree.AbstractInsnNode> List<org.objectweb.asm.tree.AbstractInsnNode> createKey(BoxExpression expr) voidvoidintgetKeys()org.objectweb.asm.tree.ClassNodegetProperty(String key) Get a Propoertystatic TranspilerList<org.objectweb.asm.tree.TryCatchBlockNode> List<org.objectweb.asm.tree.AbstractInsnNode> booleanhasCompiledFunction(String name) intvoidvoidbooleanbooleanmatchesImport(String token) voidintregisterKey(BoxExpression key) voidsetAuxiliary(String name, org.objectweb.asm.tree.ClassNode classNode) voidsetComponentCounter(int counter) voidsetOwningClass(org.objectweb.asm.tree.ClassNode node) voidsetProperty(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.ClassNodetranspile(BoxInterface boxClass) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-