Class Transpiler

java.lang.Object
ortus.boxlang.compiler.asmboxpiler.Transpiler
All Implemented Interfaces:
ITranspiler
Direct Known Subclasses:
AsmTranspiler

public abstract class Transpiler extends Object implements ITranspiler
  • Constructor Details

    • Transpiler

      public Transpiler()
  • Method Details

    • setProperty

      public void setProperty(String key, String value)
      Set a property
      Parameters:
      key - key of the Property
      value - 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

      public org.objectweb.asm.tree.ClassNode transpile(BoxInterface boxClass) throws BoxRuntimeException
      Throws:
      BoxRuntimeException
    • getProperty

      public String getProperty(String key)
      Get a Propoerty
      Parameters:
      key - key of the Property
      Returns:
      the value of the property or null if not defined
    • getTranspiler

      public static Transpiler getTranspiler()
    • transform

      public List<org.objectweb.asm.tree.AbstractInsnNode> transform(BoxNode node, TransformerContext context)
    • addUDFRegistration

      public void addUDFRegistration(String name, List<org.objectweb.asm.tree.AbstractInsnNode> nodes)
    • hasCompiledFunction

      public boolean hasCompiledFunction(String name)
    • getUDFRegistrations

      public List<org.objectweb.asm.tree.AbstractInsnNode> getUDFRegistrations()
    • transform

      public abstract List<org.objectweb.asm.tree.AbstractInsnNode> transform(BoxNode node, TransformerContext context, ReturnValueContext returnValueContext)
    • registerKey

      public int registerKey(BoxExpression key)
    • getKeys

      public Map<String,BoxExpression> getKeys()
    • getCurrentMethodContextTracker

      public Optional<MethodContextTracker> getCurrentMethodContextTracker()
    • addMethodContextTracker

      public void addMethodContextTracker(MethodContextTracker methodContextTracker)
    • popMethodContextTracker

      public void popMethodContextTracker()
    • getTryCatchStack

      public List<org.objectweb.asm.tree.TryCatchBlockNode> getTryCatchStack()
    • addTryCatchBlock

      public void addTryCatchBlock(org.objectweb.asm.tree.TryCatchBlockNode tryCatchBlockNode)
    • clearTryCatchStack

      public void clearTryCatchStack()
    • addBoxStaticInitializer

      public void addBoxStaticInitializer(BoxStaticInitializer staticInitializer)
    • getBoxStaticInitializers

      public List<BoxStaticInitializer> getBoxStaticInitializers()
    • getAuxiliary

      public Map<String,org.objectweb.asm.tree.ClassNode> getAuxiliary()
    • setAuxiliary

      public void setAuxiliary(String name, org.objectweb.asm.tree.ClassNode classNode)
    • incrementAndGetLambdaCounter

      public int incrementAndGetLambdaCounter()
    • createKey

      public List<org.objectweb.asm.tree.AbstractInsnNode> createKey(BoxExpression expr)
    • transformProperties

      public abstract List<List<org.objectweb.asm.tree.AbstractInsnNode>> transformProperties(org.objectweb.asm.Type declaringType, List<BoxProperty> properties, String sourceType)
    • createKey

      public List<org.objectweb.asm.tree.AbstractInsnNode> createKey(String expr)
    • 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

      public void addImport(BoxExpression expression, BoxIdentifier alias)
    • getImports

      public List<List<org.objectweb.asm.tree.AbstractInsnNode>> getImports()
    • matchesImport

      public boolean matchesImport(String token)