FileDocCategorySizeDatePackage
ClassGenerator.javaAPI DocJava SE 6 API4230Tue Jun 10 00:22:30 BST 2008com.sun.org.apache.xalan.internal.xsltc.compiler.util

ClassGenerator

public 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.
author
Jacek Ambroziak
author
Santiago Pericas-Geertsen

Fields Summary
protected static final 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
private final String
_applyTemplatesSigForImport
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";

    _applyTemplatesSigForImport = "(" 
        + Constants.DOM_INTF_SIG
        + Constants.NODE_ITERATOR_SIG
        + Constants.TRANSLET_OUTPUT_SIG
        + Constants.NODE_FIELD_SIG
        + ")V";  
    
Methods Summary
public final java.lang.StringgetApplyTemplatesSig()

	return _applyTemplatesSig;
    
public final java.lang.StringgetApplyTemplatesSigForImport()

    return _applyTemplatesSigForImport;
    
public final java.lang.StringgetClassName()
Pretend this is the stylesheet class. Useful when compiling references to global variables inside a predicate.

	return _stylesheet.getClassName();
    
public final java.lang.StringgetDOMClass()

	return _domClass;
    
public final java.lang.StringgetDOMClassSig()

	return _domClassSig;
    
public final com.sun.org.apache.xalan.internal.xsltc.compiler.ParsergetParser()

	return _parser;
    
public final com.sun.org.apache.xalan.internal.xsltc.compiler.StylesheetgetStylesheet()

	return _stylesheet;
    
public booleanisExternal()
Returns true or false depending on whether this class inherits from AbstractTranslet or not.

	return false;
    
public com.sun.org.apache.bcel.internal.generic.InstructionloadTranslet()

	return _aloadTranslet;