weblogic.apache.xalan.processor
Class CompiledStylesheetBundle
java.lang.Object
|
+--weblogic.apache.xalan.processor.CompiledStylesheetBundle
- public class CompiledStylesheetBundle
- extends java.lang.Object
Serialize and reload routines for Compiled Stylesheets. Basically, a
"bundle" is a zipfile containing the generated and compiled java
classes, plus a .ser (ObjectStream) representation of those classes
as actually instantiated and connected to represent a top-level
Stylesheet. This class provides routines that generate a bundle in
a disk file, and that will reread a bundle from such a file.
- Author:
- Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
- See Also:
CompilingStylesheetHandler
Method Summary
|
javax.xml.transform.Templates |
loadBundle(java.lang.String filename)
Reload an executable bundle -- a zipfile or jarfile
containing the serialized root and the synthesized classes needed
to support it, and a main entry point which retrieves these. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CompiledStylesheetBundle
public CompiledStylesheetBundle()
- Public constructor. The loadBundle() operation requires an actual
compiledStylesheetBundle object, for reasons discussed there.
loadBundle
public javax.xml.transform.Templates loadBundle(java.lang.String filename)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Reload an executable bundle -- a zipfile or jarfile
containing the serialized root and the synthesized classes needed
to support it, and a main entry point which retrieves these.
A custom classloader is used so we can pick these up interactively,
along with a customized version of ObjectInputStream that can be told
which classloader to consult.
TODO: Open issues in CompiledStylesheetBundle.loadBundle()
- At the moment this is an instance method, because the support
objects mentioned above are declared as inner classes. They're arguably
general enough to be worth factoring out...
- Should this be restructured to be able to read from other kinds of
streams? Would require significant changes to the classloader, to preload
it from the stream rather than having it access the zipfile on demand.
- Parameters:
String
- filename Filesystem name of the bundle file to be loaded.- Returns:
- Stylesheet as loaded.
- Throws:
- java.io.IOException - if there are any problems reading the
bundle file
- java.lang.ClassNotFoundException - if a class used in
serializing the Stylesheet can't be resolved. This could be a glitch
in the bundle, but is more likely to be incompatable versions if the
Xalan code was changed between when the bundle was created and when it
is being reloaded.
WebLogic classes and methods that do not appear in this reference are not public and are not supported.