| |
|
| java.lang.Object org.jibx.binding.classes.MungedClass
MungedClass | public class MungedClass (Code) | | Modifiable class handler. Each instance controls changes to a particular
class modified by one or more binding definitions. As methods are generated
they're checked for uniqueness. If an already-generated method is found with
the same characteristics (including byte code) as the one being generated,
the already-generated is used instead.
author: Dennis M. Sosnoski version: 1.0 |
addFactory | void addFactory(String fact)(Code) | | Add binding factory to class. The binding factories are accumulated as
a delimited string during generation, then dumped to a static field in
the class at the end.
Parameters: fact - binding factory name |
addModifiedClass | public static void addModifiedClass(ClassFile cf)(Code) | | Add class file to set modified.
Parameters: cf - |
checkDirectory | static void checkDirectory(File root, String pack) throws JiBXException(Code) | | Check directory for JiBX generated files. Scans through all class files
in the target directory and loads any that start with the JiBX
identifier string.
Parameters: root - class path root for directory Parameters: pack - package relative to root directory throws: JiBXException - on configuration error |
delayedAddUnique | public static void delayedAddUnique(ClassFile cf)(Code) | | Add unique support class at end of binding process. This allows a class
to be constructed in steps during handling of one or more bindings, with
the class finished and checked for uniqueness only after all bindings
have been handled. The actual add of the class is done during the
MungedClass.fixChanges(boolean) handling.
Parameters: cf - class file to be added as unique support class at end ofbinding |
fixChanges | public static ClassFile[][] fixChanges(boolean write) throws JiBXException(Code) | | Finalize changes to modified class files.
Parameters: write - replace original class files with modified versions three-way array of class files, for written, unmodified, anddeleted throws: JiBXException - on write error |
getClassFile | ClassFile getClassFile()(Code) | | Get munged class file information.
class file information for bound class |
getInstance | static MungedClass getInstance(ClassFile cf) throws JiBXException(Code) | | Get modification tracking information for class.
Parameters: cf - information for class to be modified (must be writable) binding information for class throws: JiBXException - on configuration error |
getUniqueMethod | BindingMethod getUniqueMethod(MethodBuilder builder, boolean suffix) throws JiBXException(Code) | | Get unique method. If a method matching the byte code of the supplied
method has already been defined the existing method is returned.
Otherwise the method is added to the definitions. If necessary, a number
suffix is appended to the method name to prevent conflicts with existing
names.
Parameters: builder - method to be defined Parameters: suffix - append name suffix to assure uniqueness flag defined method item throws: JiBXException - on configuration error |
getUniqueSupportClass | public static ClassFile getUniqueSupportClass(ClassFile cf)(Code) | | Get unique generated support class. Allows tracking of all generated
classes for common handling with the bound classes. Each generated
support class is associated with a particular bound class.
Parameters: cf - generated class file unique class file information |
reset | public static void reset()(Code) | | Discard cached information and reset in preparation for a new binding
run.
|
setFactoryList | void setFactoryList() throws JiBXException(Code) | | Generate factory list. Adds or replaces the existing static array of
factories in the class.
throws: JiBXException - on configuration error |
|
|
|