|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.xsltc.trax.TemplatesImpl
public final class TemplatesImpl
Nested Class Summary | |
---|---|
(package private) static class |
TemplatesImpl.TransletClassLoader
|
Field Summary | |
---|---|
private Hashtable |
_auxClasses
Contains the list of auxiliary class definitions. |
private byte[][] |
_bytecodes
Contains the actual class definition for the translet class and any auxiliary classes. |
private java.lang.Class[] |
_class
Contains the translet class definition(s). |
private int |
_indentNumber
Number of spaces to add for output indentation. |
private java.lang.String |
_name
Name of the main class or default name if unknown. |
private java.util.Properties |
_outputProperties
Output properties of this translet. |
private java.lang.ThreadLocal |
_sdom
Cache the DTM for the stylesheet in a thread local variable, which is used by the document('') function. |
private TransformerFactoryImpl |
_tfactory
A reference to the transformer factory that this templates object belongs to. |
private int |
_transletIndex
The index of the main translet class in the arrays _class[] and _bytecodes. |
private javax.xml.transform.URIResolver |
_uriResolver
This URIResolver is passed to all Transformers. |
private static java.lang.String |
ABSTRACT_TRANSLET
Name of the superclass of all translets. |
(package private) static long |
serialVersionUID
|
Constructor Summary | |
---|---|
|
TemplatesImpl()
Need for de-serialization, see readObject(). |
protected |
TemplatesImpl(byte[][] bytecodes,
java.lang.String transletName,
java.util.Properties outputProperties,
int indentNumber,
TransformerFactoryImpl tfactory)
Create an XSLTC template object from the bytecodes. |
protected |
TemplatesImpl(java.lang.Class[] transletClasses,
java.lang.String transletName,
java.util.Properties outputProperties,
int indentNumber,
TransformerFactoryImpl tfactory)
Create an XSLTC template object from the translet class definition(s). |
Method Summary | |
---|---|
private void |
defineTransletClasses()
Defines the translet class and auxiliary classes. |
java.util.Properties |
getOutputProperties()
Implements JAXP's Templates.getOutputProperties(). |
DOM |
getStylesheetDOM()
Return the thread local copy of the stylesheet DOM. |
byte[][] |
getTransletBytecodes()
Returns the translet bytecodes stored in this template |
java.lang.Class[] |
getTransletClasses()
Returns the translet bytecodes stored in this template |
int |
getTransletIndex()
Returns the index of the main class in array of bytecodes |
private Translet |
getTransletInstance()
This method generates an instance of the translet class that is wrapped inside this Template. |
protected java.lang.String |
getTransletName()
Returns the name of the main translet class stored in this template |
javax.xml.transform.Transformer |
newTransformer()
Implements JAXP's Templates.newTransformer() |
private void |
readObject(java.io.ObjectInputStream is)
Overrides the default readObject implementation since we decided it would be cleaner not to serialize the entire tranformer factory. |
void |
setStylesheetDOM(DOM sdom)
Set the thread local copy of the stylesheet DOM. |
protected void |
setTransletBytecodes(byte[][] bytecodes)
The TransformerFactory must pass us the translet bytecodes using this method before we can create any translet instances |
protected void |
setTransletName(java.lang.String name)
The TransformerFactory should call this method to set the translet name |
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Store URIResolver needed for Transformers. |
private void |
writeObject(java.io.ObjectOutputStream os)
This is to fix bugzilla bug 22438 If the user defined class implements URIResolver and Serializable then we want it to get serialized |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
private static java.lang.String ABSTRACT_TRANSLET
private java.lang.String _name
private byte[][] _bytecodes
private java.lang.Class[] _class
private int _transletIndex
private Hashtable _auxClasses
private java.util.Properties _outputProperties
private int _indentNumber
private transient javax.xml.transform.URIResolver _uriResolver
private transient java.lang.ThreadLocal _sdom
private transient TransformerFactoryImpl _tfactory
Constructor Detail |
---|
protected TemplatesImpl(byte[][] bytecodes, java.lang.String transletName, java.util.Properties outputProperties, int indentNumber, TransformerFactoryImpl tfactory)
protected TemplatesImpl(java.lang.Class[] transletClasses, java.lang.String transletName, java.util.Properties outputProperties, int indentNumber, TransformerFactoryImpl tfactory)
public TemplatesImpl()
Method Detail |
---|
private void readObject(java.io.ObjectInputStream is) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
private void writeObject(java.io.ObjectOutputStream os) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void setURIResolver(javax.xml.transform.URIResolver resolver)
protected void setTransletBytecodes(byte[][] bytecodes)
public byte[][] getTransletBytecodes()
public java.lang.Class[] getTransletClasses()
public int getTransletIndex()
protected void setTransletName(java.lang.String name)
protected java.lang.String getTransletName()
private void defineTransletClasses() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
private Translet getTransletInstance() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
public javax.xml.transform.Transformer newTransformer() throws javax.xml.transform.TransformerConfigurationException
newTransformer
in interface javax.xml.transform.Templates
javax.xml.transform.TransformerConfigurationException
public java.util.Properties getOutputProperties()
getOutputProperties
in interface javax.xml.transform.Templates
public DOM getStylesheetDOM()
public void setStylesheetDOM(DOM sdom)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |