public class BindGen extends Object
public access, they are
intended for use only by the JiBX developers and may change from one release to the next. To make use of this class
from your own code, call the main(String[]) method with an appropriate argument list.| Constructor and Description |
|---|
BindGen(GlobalCustom glob)
Create a generator based on a particular set of customizations.
|
| Modifier and Type | Method and Description |
|---|---|
BindingHolder |
addBinding(String uri,
boolean dflt)
Get the binding definition for a namespace, creating a new one if not previously defined.
|
void |
addRootUris(Collection uris)
Adds a collection of namespace URIs to be referenced at root binding level.
|
boolean |
checkInclude(String type)
Check if a class needs to be included in the binding.
|
void |
defineCollection(String itype,
String iname,
CollectionElement coll,
BindingHolder hold)
Define the details of a collection binding.
|
void |
expandReferences(String type,
ReferenceCountMap refmap)
Expand all references from a class.
|
BindingHolder |
finish(String name)
Complete the generated bindings.
|
void |
generate(Boolean abstr,
List classes)
Generate binding(s) for a list of classes.
|
void |
generateSpecified(ArrayList qnames,
List concrs,
List abstrs)
Generate binding(s) for lists of classes.
|
BindingHolder |
getBinding(String uri)
Get the binding definition for a namespace, which must already have been created.
|
BindingMappingDetail |
getMappingDetail(String type)
Get the mapping details for a class.
|
boolean |
isValueClass(String type)
Check if a class represents a simple value.
|
static void |
main(String[] args)
Run the binding generation using command line parameters.
|
List |
validateFiles(File dir,
IClassLocator loc,
BindingHolder root)
Write and validate the generated binding definition files.
|
public BindGen(GlobalCustom glob)
glob - public boolean isValueClass(String type)
type - fully qualified class nametrue if simple value, false if notpublic boolean checkInclude(String type)
true if any member is ultimately found with a simple value.type - fully qualified class nametrue if class to be included in binding, false if it should be skippedpublic void expandReferences(String type, ReferenceCountMap refmap)
type - fully qualified class namerefmap - reference count mappublic void defineCollection(String itype, String iname, CollectionElement coll, BindingHolder hold)
itype - item typeiname - item namecoll - hold - public void generate(Boolean abstr, List classes)
abstr - force abstract mapping flag (use both abstract and concrete if null)classes - class listpublic void generateSpecified(ArrayList qnames, List concrs, List abstrs)
qnames - list of names for concrete mappingsconcrs - list of classes to be given concrete mappingsabstrs - list of classes to be given abstract mappingspublic BindingMappingDetail getMappingDetail(String type)
generate(Boolean, List) method has been called.type - fully-qualified class namenull if nonepublic BindingHolder getBinding(String uri)
generate(Boolean, List) method has been called. It delegates to the
BindingOrganizer implementation.uri - public void addRootUris(Collection uris)
uris - public BindingHolder addBinding(String uri, boolean dflt)
generate(Boolean, List) method has been called. It delegates to the
BindingOrganizer implementation.uri - dflt - namespace is default for elements in binding flagpublic BindingHolder finish(String name)
name - file name for root or singleton binding definitionpublic List validateFiles(File dir, IClassLocator loc, BindingHolder root) throws IOException, JiBXException
dir - target directory (bindings not written if null)loc - class locator for binding validation (ignored if no target directory supplied)root - holder for root binding definitionnull if validation errorIOExceptionJiBXExceptionpublic static void main(String[] args) throws JiBXException, IOException
args - JiBXExceptionIOExceptionCopyright © 2005-2014 jibx.org. All Rights Reserved.