org.apache.xalan.xsltc.compiler.util
Class ClassGenerator

java.lang.Object
  extended by ClassGen
      extended by org.apache.xalan.xsltc.compiler.util.ClassGenerator
Direct Known Subclasses:
FilterGenerator, NodeCounterGenerator, NodeSortRecordFactGenerator, NodeSortRecordGenerator

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.


Field Summary
private  Instruction _aloadTranslet
           
private  java.lang.String _applyTemplatesSig
           
private  java.lang.String _applyTemplatesSigForImport
           
private  java.lang.String _domClass
           
private  java.lang.String _domClassSig
           
private  Parser _parser
           
private  Stylesheet _stylesheet
           
protected static int TRANSLET_INDEX
           
 
Constructor Summary
ClassGenerator(java.lang.String class_name, java.lang.String super_class_name, java.lang.String file_name, int access_flags, java.lang.String[] interfaces, Stylesheet stylesheet)
           
 
Method Summary
 void addMethod(MethodGenerator methodGen)
           
 java.lang.String getApplyTemplatesSig()
           
 java.lang.String getApplyTemplatesSigForImport()
           
 java.lang.String getClassName()
          Pretend this is the stylesheet class.
 java.lang.String getDOMClass()
           
 java.lang.String getDOMClassSig()
           
 Parser getParser()
           
 Stylesheet getStylesheet()
           
 boolean isExternal()
          Returns true or false depending on whether this class inherits from AbstractTranslet or not.
 Instruction loadTranslet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSLET_INDEX

protected static final int TRANSLET_INDEX
See Also:
Constant Field Values

_stylesheet

private Stylesheet _stylesheet

_parser

private final Parser _parser

_aloadTranslet

private final Instruction _aloadTranslet

_domClass

private final java.lang.String _domClass

_domClassSig

private final java.lang.String _domClassSig

_applyTemplatesSig

private final java.lang.String _applyTemplatesSig

_applyTemplatesSigForImport

private final java.lang.String _applyTemplatesSigForImport
Constructor Detail

ClassGenerator

public ClassGenerator(java.lang.String class_name,
                      java.lang.String super_class_name,
                      java.lang.String file_name,
                      int access_flags,
                      java.lang.String[] interfaces,
                      Stylesheet stylesheet)
Method Detail

getParser

public final Parser getParser()

getStylesheet

public final Stylesheet getStylesheet()

getClassName

public final java.lang.String getClassName()
Pretend this is the stylesheet class. Useful when compiling references to global variables inside a predicate.


loadTranslet

public Instruction loadTranslet()

getDOMClass

public final java.lang.String getDOMClass()

getDOMClassSig

public final java.lang.String getDOMClassSig()

getApplyTemplatesSig

public final java.lang.String getApplyTemplatesSig()

getApplyTemplatesSigForImport

public final java.lang.String getApplyTemplatesSigForImport()

isExternal

public boolean isExternal()
Returns true or false depending on whether this class inherits from AbstractTranslet or not.


addMethod

public void addMethod(MethodGenerator methodGen)