|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.xsltc.compiler.SyntaxTreeNode org.apache.xalan.xsltc.compiler.Instruction org.apache.xalan.xsltc.compiler.Number
final class Number
Field Summary | |
---|---|
private java.lang.String |
_className
|
private java.util.ArrayList |
_closureVars
|
private Pattern |
_count
|
private AttributeValueTemplate |
_format
|
private boolean |
_formatNeeded
|
private Pattern |
_from
|
private AttributeValueTemplate |
_groupingSeparator
|
private AttributeValueTemplate |
_groupingSize
|
private AttributeValueTemplate |
_lang
|
private AttributeValueTemplate |
_letterValue
|
private int |
_level
|
private Expression |
_value
|
private static java.lang.String[] |
ClassNames
|
private static java.lang.String[] |
FieldNames
|
private static int |
LEVEL_ANY
|
private static int |
LEVEL_MULTIPLE
|
private static int |
LEVEL_SINGLE
|
Fields inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
---|
_attributes, _parent, _qname, Dummy, IndentIncrement, UNKNOWN_STYLESHEET_NODE_ID |
Constructor Summary | |
---|---|
Number()
|
Method Summary | |
---|---|
void |
addVariable(VariableRefBase variableRef)
Add new variable to the closure. |
private void |
compileConstructor(ClassGenerator classGen)
Compiles a constructor for the class _className that inherits from {Any,Single,Multiple}NodeCounter. |
private void |
compileDefault(ClassGenerator classGen,
MethodGenerator methodGen)
|
private void |
compileLocals(NodeCounterGenerator nodeCounterGen,
MatchGenerator matchGen,
InstructionList il)
This method compiles code that is common to matchesFrom() and matchesCount() in the auxillary class. |
private void |
compilePatterns(ClassGenerator classGen,
MethodGenerator methodGen)
|
java.lang.String |
getInnerClassName()
Returns the name of the auxiliary class or null if this predicate is compiled inside the Translet. |
Closure |
getParentClosure()
Returns a reference to its parent closure or null if outermost. |
boolean |
hasValue()
True if the has specified a value for this instance of number. |
boolean |
inInnerClass()
Returns true if this closure is compiled in an inner class (i.e. |
boolean |
isDefault()
Returns true if this instance of number has neither a from nor a count pattern. |
void |
parseContents(Parser parser)
Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions). |
void |
translate(ClassGenerator classGen,
MethodGenerator methodGen)
Translate this node into JVM bytecodes. |
Type |
typeCheck(SymbolTable stable)
Type check all the children of this node. |
Methods inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
---|
addAttribute, addElement, addPrefixMapping, compileResultTree, contextDependent, dependentContents, display, displayContents, elementAt, elementCount, elements, getAttribute, getAttribute, getAttributes, getContents, getImportPrecedence, getLineNumber, getNodeIDForStylesheetNSLookup, getParent, getParser, getPrefixMapping, getQName, getStylesheet, getSymbolTable, getTemplate, getXSLTC, hasAttribute, hasContents, indent, isDummy, lastChild, lookupNamespace, lookupPrefix, parseChildren, removeElement, reportError, reportWarning, setAttributes, setFirstElement, setLineNumber, setParent, setParser, setPrefixMapping, setQName, setQName, translateContents, typeCheckContents, updateScope |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int LEVEL_SINGLE
private static final int LEVEL_MULTIPLE
private static final int LEVEL_ANY
private static final java.lang.String[] ClassNames
private static final java.lang.String[] FieldNames
private Pattern _from
private Pattern _count
private Expression _value
private AttributeValueTemplate _lang
private AttributeValueTemplate _format
private AttributeValueTemplate _letterValue
private AttributeValueTemplate _groupingSeparator
private AttributeValueTemplate _groupingSize
private int _level
private boolean _formatNeeded
private java.lang.String _className
private java.util.ArrayList _closureVars
Constructor Detail |
---|
Number()
Method Detail |
---|
public boolean inInnerClass()
inInnerClass
in interface Closure
public Closure getParentClosure()
getParentClosure
in interface Closure
public java.lang.String getInnerClassName()
getInnerClassName
in interface Closure
public void addVariable(VariableRefBase variableRef)
addVariable
in interface Closure
public void parseContents(Parser parser)
SyntaxTreeNode
parseContents
in class SyntaxTreeNode
parser
- reference to the XSLT parserpublic Type typeCheck(SymbolTable stable) throws TypeCheckError
Instruction
typeCheck
in class Instruction
stable
- The compiler/parser's symbol table
TypeCheckError
public boolean hasValue()
public boolean isDefault()
private void compileDefault(ClassGenerator classGen, MethodGenerator methodGen)
private void compileConstructor(ClassGenerator classGen)
private void compileLocals(NodeCounterGenerator nodeCounterGen, MatchGenerator matchGen, InstructionList il)
private void compilePatterns(ClassGenerator classGen, MethodGenerator methodGen)
public void translate(ClassGenerator classGen, MethodGenerator methodGen)
Instruction
translate
in class Instruction
classGen
- BCEL Java class generatormethodGen
- BCEL Java method generator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |