Package gnu.kawa.xml
Class NodeConstructor
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Procedure
-
- gnu.mapping.ProcedureN
-
- gnu.mapping.MethodProc
-
- gnu.kawa.xml.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 Summary
Fields Modifier and Type Field Description protected int
options
-
Fields inherited from class gnu.mapping.MethodProc
applyToConsumerDefaultMP, argTypes, NO_MATCH, NO_MATCH_AMBIGUOUS, NO_MATCH_BAD_TYPE, NO_MATCH_GUARD_FALSE, NO_MATCH_TOO_FEW_ARGS, NO_MATCH_TOO_MANY_ARGS, NO_MATCH_UNUSED_KEYWORD, THROW_ON_EXCEPTION
-
Fields inherited from class gnu.mapping.ProcedureN
applyToObject, noArgs
-
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Constructor Summary
Constructors Constructor Description NodeConstructor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
compile(ApplyExp exp, Compilation comp, Target target)
static void
compileChild(Expression arg, boolean stringIsText, Compilation comp, ConsumerTarget target)
abstract void
compileToNode(ApplyExp exp, Compilation comp, ConsumerTarget target)
static void
compileUsingNodeTree(Expression exp, Compilation comp, Target target)
Compile an expression using a fresh NodeTree.static KNode
finishNode(XMLFilter filter)
Type
getReturnType(Expression[] args)
Semi-deprecated - instead should be set at Inline time.boolean
getStringIsText()
If true, top-level strings are treated as text nodes.boolean
isSideEffectFree()
True if this Procedure (definitely) has no side-effects.static XMLFilter
makeNode()
static void
popNodeConsumer(Consumer saved, Consumer current)
static void
popNodeContext(Consumer saved, CallContext ctx)
static XMLFilter
pushNodeConsumer(Consumer out)
static XMLFilter
pushNodeContext(CallContext ctx)
void
setStringIsText(boolean stringIsText)
static void
writeContent(Object arg, Consumer out)
protected static void
writeContent1(Object arg, Consumer out)
static void
writeContentS(Object arg, Consumer out)
-
Methods inherited from class gnu.mapping.MethodProc
applyToConsumerDefaultMP, getParameterType, isApplicable, matchFailAsException, mostSpecific, numParameters, overrideEquivalent, resolveParameterTypes
-
Methods inherited from class gnu.mapping.ProcedureN
applyToObject
-
Methods inherited from class gnu.mapping.Procedure
apply0, apply1, apply2, apply3, apply4, applyL, applyN, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getSetter, getSourceLocation, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, numArgs, set0, set1, setN, setSetter, setSourceLocation, toString
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Method Detail
-
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)
-
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()
-
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 classProcedure
-
compile
public void compile(ApplyExp exp, Compilation comp, Target target)
- Specified by:
compile
in interfaceInlineable
-
getReturnType
public Type getReturnType(Expression[] args)
Description copied from class:Procedure
Semi-deprecated - instead should be set at Inline time. FIXME- Overrides:
getReturnType
in classProcedure
-
-