Package gnu.kawa.xml

Class NodeConstructor

All Implemented Interfaces:
Inlineable, Named
Direct Known Subclasses:
ApplyTemplates, DocumentConstructor, MakeAttribute, MakeElement, MakeProcInst, MakeText, MakeWithBaseUri

public abstract class NodeConstructor extends MethodProc implements Inlineable
  • Field Details

    • options

      protected int options
  • Constructor Details

    • NodeConstructor

      public NodeConstructor()
  • Method Details

    • compileToNode

      public abstract void compileToNode(ApplyExp exp, Compilation comp, ConsumerTarget target)
    • getStringIsText

      public boolean getStringIsText()
      If true, top-level strings are treated as text nodes. This means don't separate them with spaces when printing as XML.
    • setStringIsText

      public void setStringIsText(boolean stringIsText)
    • pushNodeConsumer

      public static XMLFilter pushNodeConsumer(Consumer out)
    • popNodeConsumer

      public static void popNodeConsumer(Consumer saved, Consumer current)
    • pushNodeContext

      public static XMLFilter pushNodeContext(CallContext ctx)
    • popNodeContext

      public static void popNodeContext(Consumer saved, CallContext ctx)
    • compileChild

      public static void compileChild(Expression arg, boolean stringIsText, Compilation comp, ConsumerTarget target)
    • compileUsingNodeTree

      public static void compileUsingNodeTree(Expression exp, Compilation comp, Target target)
      Compile an expression using a fresh NodeTree. Compare with ConsumerTarget.compileUsingConsumer, but creates a NodeTree.
    • makeNode

      public static XMLFilter makeNode()
    • finishNode

      public static KNode finishNode(XMLFilter filter)
    • isSideEffectFree

      public boolean isSideEffectFree()
      Description copied from class: Procedure
      True if this Procedure (definitely) has no side-effects. Note side-effect-free does not imply idempotent if this allocates an object with "identity".
      Overrides:
      isSideEffectFree in class Procedure
    • compile

      public void compile(ApplyExp exp, Compilation comp, Target target)
      Specified by:
      compile in interface Inlineable
    • getReturnType

      public Type getReturnType(Expression[] args)
      Description copied from class: Procedure
      Semi-deprecated - instead should be set at Inline time. FIXME
      Overrides:
      getReturnType in class Procedure
    • writeContentS

      public static void writeContentS(Object arg, Consumer out)
    • writeContent

      public static void writeContent(Object arg, Consumer out)
    • writeContent1

      protected static void writeContent1(Object arg, Consumer out)