|
||||||||||
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.Sort
final class Sort
Field Summary | |
---|---|
private AttributeValue |
_caseOrder
|
private java.lang.String |
_className
|
private java.util.ArrayList |
_closureVars
|
private java.lang.String |
_data
|
private AttributeValue |
_dataType
|
private java.lang.String |
_lang
|
private boolean |
_needsSortRecordFactory
|
private AttributeValue |
_order
|
private Expression |
_select
|
Fields inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
---|
_attributes, _parent, _qname, Dummy, IndentIncrement, UNKNOWN_STYLESHEET_NODE_ID |
Constructor Summary | |
---|---|
Sort()
|
Method Summary | |
---|---|
void |
addVariable(VariableRefBase variableRef)
Add new variable to the closure. |
private static MethodGenerator |
compileExtract(java.util.Vector sortObjects,
NodeSortRecordGenerator sortRecord,
ConstantPoolGen cpg,
java.lang.String className)
Compiles a method that overloads NodeSortRecord.extractValueFromDOM() |
private static MethodGenerator |
compileInit(java.util.Vector sortObjects,
NodeSortRecordGenerator sortRecord,
ConstantPoolGen cpg,
java.lang.String className)
Create a constructor for the new class. |
private static java.lang.String |
compileSortRecord(java.util.Vector sortObjects,
ClassGenerator classGen,
MethodGenerator methodGen)
Create a new auxillary class extending NodeSortRecord. |
static void |
compileSortRecordFactory(java.util.Vector sortObjects,
ClassGenerator classGen,
MethodGenerator methodGen)
Compiles code that instantiates a NodeSortRecordFactory object which will produce NodeSortRecord objects of a specific type. |
static java.lang.String |
compileSortRecordFactory(java.util.Vector sortObjects,
ClassGenerator classGen,
MethodGenerator methodGen,
java.lang.String sortRecordClass)
|
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 |
inInnerClass()
Returns true if this closure is compiled in an inner class (i.e. |
void |
parseContents(Parser parser)
Parse the attributes of the xsl:sort element |
private void |
setInnerClassName(java.lang.String className)
|
void |
translate(ClassGenerator classGen,
MethodGenerator methodGen)
This method should not produce any code |
void |
translateCaseOrder(ClassGenerator classGen,
MethodGenerator methodGen)
|
void |
translateLang(ClassGenerator classGen,
MethodGenerator methodGen)
|
void |
translateSelect(ClassGenerator classGen,
MethodGenerator methodGen)
This method compiles code for the select expression for this xsl:sort element. |
static void |
translateSortIterator(ClassGenerator classGen,
MethodGenerator methodGen,
Expression nodeSet,
java.util.Vector sortObjects)
Compiles code that instantiates a SortingIterator object. |
void |
translateSortOrder(ClassGenerator classGen,
MethodGenerator methodGen)
|
void |
translateSortType(ClassGenerator classGen,
MethodGenerator methodGen)
These two methods are needed in the static methods that compile the overloaded NodeSortRecord.compareType() and NodeSortRecord.sortOrder() |
Type |
typeCheck(SymbolTable stable)
Run type checks on the attributes; expression must return a string which we will use as a sort key |
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 Expression _select
private AttributeValue _order
private AttributeValue _caseOrder
private AttributeValue _dataType
private java.lang.String _lang
private java.lang.String _data
private java.lang.String _className
private java.util.ArrayList _closureVars
private boolean _needsSortRecordFactory
Constructor Detail |
---|
Sort()
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
private void setInnerClassName(java.lang.String className)
public void parseContents(Parser parser)
parseContents
in class SyntaxTreeNode
parser
- reference to the XSLT parserpublic Type typeCheck(SymbolTable stable) throws TypeCheckError
typeCheck
in class Instruction
stable
- The compiler/parser's symbol table
TypeCheckError
public void translateSortType(ClassGenerator classGen, MethodGenerator methodGen)
public void translateSortOrder(ClassGenerator classGen, MethodGenerator methodGen)
public void translateCaseOrder(ClassGenerator classGen, MethodGenerator methodGen)
public void translateLang(ClassGenerator classGen, MethodGenerator methodGen)
public void translateSelect(ClassGenerator classGen, MethodGenerator methodGen)
public void translate(ClassGenerator classGen, MethodGenerator methodGen)
translate
in class Instruction
classGen
- BCEL Java class generatormethodGen
- BCEL Java method generatorpublic static void translateSortIterator(ClassGenerator classGen, MethodGenerator methodGen, Expression nodeSet, java.util.Vector sortObjects)
public static void compileSortRecordFactory(java.util.Vector sortObjects, ClassGenerator classGen, MethodGenerator methodGen)
public static java.lang.String compileSortRecordFactory(java.util.Vector sortObjects, ClassGenerator classGen, MethodGenerator methodGen, java.lang.String sortRecordClass)
private static java.lang.String compileSortRecord(java.util.Vector sortObjects, ClassGenerator classGen, MethodGenerator methodGen)
private static MethodGenerator compileInit(java.util.Vector sortObjects, NodeSortRecordGenerator sortRecord, ConstantPoolGen cpg, java.lang.String className)
private static MethodGenerator compileExtract(java.util.Vector sortObjects, NodeSortRecordGenerator sortRecord, ConstantPoolGen cpg, java.lang.String className)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |