| java.lang.Object org.jibx.binding.generator.BindingGenerator
BindingGenerator | public class BindingGenerator (Code) | | Binding generator implementation.
|
Inner Class :public static class MappingDetail | |
BindingGenerator | public BindingGenerator(GlobalCustom glob)(Code) | | Create a generator based on a particular set of customizations.
Parameters: glob - |
checkInclude | public boolean checkInclude(String type)(Code) | | Check if a class needs to be included in the binding. This checks all
members of the class and if necessary superclasses, returning
true if any member is ultimately found with a simple value.
Parameters: type - fully qualified class name true if class to be included in binding,false if it should be skipped |
configureBindings | public BindingHolder configureBindings(String name)(Code) | | Configure the names to be used for writing bindings to files. If only one
binding has been defined, it just gets the supplied name. If multiple
bindings have been defined, a single root binding is constructed which
includes all the other bindings, and that root binding is given the
supplied names while the other bindings are given unique names within the
same directory.
Parameters: name - file name for root or singleton binding definition root or singleton binding holder |
defineCollection | public void defineCollection(String itype, String iname, CollectionElement coll, BindingHolder hold)(Code) | | Define the details of a collection binding. Collection bindings may be
empty (in the case where the item type is directly mapped), have a
<value> child element, or have either a mapping reference or direct
definition <structure> child element. This determines the appropriate
form based on the item type.
Parameters: itype - Parameters: iname - Parameters: coll - Parameters: hold - |
expandReferences | public void expandReferences(String type, ReferenceCountMap refmap)(Code) | | Expand all references from a class. This checks the types of all members
of the class, counting references and calling itself recursively for any
types which are not primitives and not java.* or javax.* classes. It also
expands the superclass, if specified by the class customizations.
Parameters: type - fully qualified class name Parameters: refmap - reference count map |
findBinding | public BindingHolder findBinding(String uri)(Code) | | Find the binding to be used for a particular namespace. If this is the
first time a particular namespace was requested, a new binding will be
created for that namespace and returned.
Parameters: uri - namespace URI (null if no namespace) binding holder |
generate | public void generate(Boolean abstr, List classes)(Code) | | Generate binding(s) for a list of classes. This creates a <mapping>
definition for each class in the list, and either embeds <structure>
definitions or creates separate <mapping>s for other classes
referenced by these classes. If all the classes use the same namespace
only the binding for that namespace will be created; otherwise, a
separate binding will be created for each namespace.
Parameters: abstr - force abstract mapping flag (determined by classcustomizations if null ) Parameters: classes - class list |
generateSpecified | public void generateSpecified(ArrayList qnames, List concrs, List abstrs)(Code) | | Generate binding(s) for lists of classes. This creates a <mapping>
definition for each class in the lists, and either embeds <structure>
definitions or creates separate <mapping>s for other classes
referenced by these classes. If all the classes use the same namespace
only the binding for that namespace will be created; otherwise, a
separate binding will be created for each namespace.
Parameters: qnames - list of names for concrete mappings Parameters: concrs - list of classes to be given concrete mappings Parameters: abstrs - list of classes to be given abstract mappings |
getMappingDetail | public MappingDetail getMappingDetail(String type)(Code) | | Get the mapping details for a class. This method should only be used
after the
BindingGenerator.generate(boolean,ArrayList) method has
been called.
Parameters: type - fully-qualified class name mapping details, or null if none |
getNamespaces | public ArrayList getNamespaces()(Code) | | Get the list of binding namespace URIs.
namespaces |
isEqual | public static boolean isEqual(Object a, Object b)(Code) | | General object comparison method. Don't know why Sun hasn't seen fit to
include this somewhere, but at least it's easy to write (over and over
again).
Parameters: a - first object to be compared Parameters: b - second object to be compared true if both objects are null , or ifa.equals(b) ; false otherwise |
isValueClass | public boolean isValueClass(String type)(Code) | | Check if a class represents a simple value.
TODO: implement ClassCustom hooks for this purpose
Parameters: type - fully qualified class name true if simple value, false if not |
|
|