ClassGeneratorpublic class ClassGenerator extends ClassGen The class that implements any class that inherits from
AbstractTranslet, i.e. any translet. Methods in this
class may be of the following kinds:
1. Main method: applyTemplates, implemented by intances of
MethodGenerator.
2. Named methods: for named templates, implemented by instances
of NamedMethodGenerator.
3. Rt methods: for result tree fragments, implemented by
instances of RtMethodGenerator. |
Fields Summary |
---|
protected static int | TRANSLET_INDEX | protected static int | INVALID_INDEX | private Stylesheet | _stylesheet | private final Parser | _parser | private final Instruction | _aloadTranslet | private final String | _domClass | private final String | _domClassSig | private final String | _applyTemplatesSig |
Constructors Summary |
---|
public ClassGenerator(String class_name, String super_class_name, String file_name, int access_flags, String[] interfaces, Stylesheet stylesheet)
super(class_name, super_class_name, file_name,
access_flags, interfaces);
_stylesheet = stylesheet;
_parser = stylesheet.getParser();
_aloadTranslet = new ALOAD(TRANSLET_INDEX);
if (stylesheet.isMultiDocument()) {
_domClass = "com.sun.org.apache.xalan.internal.xsltc.dom.MultiDOM";
_domClassSig = "Lcom/sun/org/apache/xalan/internal/xsltc/dom/MultiDOM;";
}
else {
_domClass = "com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter";
_domClassSig = "Lcom/sun/org/apache/xalan/internal/xsltc/dom/DOMAdapter;";
}
_applyTemplatesSig = "("
+ Constants.DOM_INTF_SIG
+ Constants.NODE_ITERATOR_SIG
+ Constants.TRANSLET_OUTPUT_SIG
+ ")V";
|
|