Top Description Fields Constructors Methods
com.sun.tools.xjc.reader.dtd.bindinfo

public Class BindInfo

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.Collection, .HashMap, .Map, javax.xml.parsers.ParserConfigurationException, .SAXParserFactory, .DocumentBuilderFactory, javax.xml.validation.ValidatorHandler, com.sun.codemodel.ClassType, .JClass, .JClassAlreadyExistsException, .JCodeModel, .JDefinedClass, .JPackage, com.sun.istack.SAXParseException2, com.sun.tools.xjc.AbortException, .ErrorReceiver, .SchemaCache, com.sun.tools.xjc.model.CCustomizations, .CPluginCustomization, .Model, com.sun.tools.xjc.reader.Const, com.sun.tools.xjc.util.CodeModelClassFactory, .ErrorReceiverFilter, .ForkContentHandler, org.glassfish.jaxb.core.v2.util.XmlFactory, org.w3c.dom.Document, .Element, org.xml.sax.InputSource, .SAXException, .XMLReader

Root of the binding information.

Field Summary

Modifier and TypeField and Description
private static final SchemaCache
bindingFileSchema

Lazily parsed schema for the binding file.

pack-priv final CodeModelClassFactory
classFactory

Wrap the codeModel object and automate error reporting.

pack-priv final JCodeModel
codeModel

CodeModel object that is used by this binding file.

private final Map<String, BIConversion>
conversions

Conversion declarations.

private final String
defaultPackage

The -p option that should control the default Java package that will contain the generated code.

private final Element
dom

DOM tree that represents binding info.

private final Map<String, BIElement>
elements

Element declarations keyed by names.

protected final ErrorReceiver
errorReceiver

Controller object that can be used to report errors.

private final Map<String, BIInterface>
interfaces

interface declarations keyed by names.

pack-priv final Model
private static final String
XJC_NS

XJC extension namespace.

Constructor Summary

AccessConstructor and Description
public
BindInfo(Model model, InputSource source, ErrorReceiver _errorReceiver)

public
BindInfo(Model model, Document _dom, ErrorReceiver _errorReceiver)

Method Summary

Modifier and TypeMethod and Description
public BIConversion

Returns:

A non-null valid BIConversion object.
conversion
(String name)

Gets the conversion declaration from the binding info.

public BIElement

Returns:

If there is no declaration with a given name, this method returns null.
element
(String name)

Gets the element declaration from the binding info.

public Collection<BIElement>
elements()

Iterates all BIElements in a read-only set.

private CCustomizations
getGlobalCustomizations()

Gets the list of top-level CPluginCustomizations.

private String
getOption(String attName, String defaultValue)

Gets the value from the option element.

public Long
getSerialVersionUID()

Gets the serialVersionUID if it's turned on.

public JClass
getSuperClass()

Gets the xjc:superClass customization if it's turned on.

public JClass
getSuperInterface()

Gets the xjc:superInterface customization if it's turned on.

public JPackage
getTargetPackage()

Gets the specified package name (options/@package).

public Collection<BIInterface>
interfaces()

Returns all BIInterfaces in a read-only set.

private static Document
parse(Model model, InputSource is, ErrorReceiver receiver)

Parses an InputSource into dom4j Document.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bindingFileSchemaback to summary
private static final SchemaCache bindingFileSchema

Lazily parsed schema for the binding file.

classFactoryback to summary
pack-priv final CodeModelClassFactory classFactory

Wrap the codeModel object and automate error reporting.

codeModelback to summary
pack-priv final JCodeModel codeModel

CodeModel object that is used by this binding file.

conversionsback to summary
private final Map<String, BIConversion> conversions

Conversion declarations.

defaultPackageback to summary
private final String defaultPackage

The -p option that should control the default Java package that will contain the generated code. Null if unspecified. This takes precedence over the value specified in the binding file.

domback to summary
private final Element dom

DOM tree that represents binding info.

elementsback to summary
private final Map<String, BIElement> elements

Element declarations keyed by names.

errorReceiverback to summary
protected final ErrorReceiver errorReceiver

Controller object that can be used to report errors.

interfacesback to summary
private final Map<String, BIInterface> interfaces

interface declarations keyed by names.

modelback to summary
pack-priv final Model model
XJC_NSback to summary
private static final String XJC_NS

XJC extension namespace.

Constructor Detail

BindInfoback to summary
public BindInfo(Model model, InputSource source, ErrorReceiver _errorReceiver) throws AbortException
BindInfoback to summary
public BindInfo(Model model, Document _dom, ErrorReceiver _errorReceiver)

Method Detail

conversionback to summary
public BIConversion conversion(String name)

Gets the conversion declaration from the binding info.

Returns:BIConversion

A non-null valid BIConversion object.

elementback to summary
public BIElement element(String name)

Gets the element declaration from the binding info.

Returns:BIElement

If there is no declaration with a given name, this method returns null.

elementsback to summary
public Collection<BIElement> elements()

Iterates all BIElements in a read-only set.

getGlobalCustomizationsback to summary
private CCustomizations getGlobalCustomizations()

Gets the list of top-level CPluginCustomizations.

getOptionback to summary
private String getOption(String attName, String defaultValue)

Gets the value from the option element.

getSerialVersionUIDback to summary
public Long getSerialVersionUID()

Gets the serialVersionUID if it's turned on.

getSuperClassback to summary
public JClass getSuperClass()

Gets the xjc:superClass customization if it's turned on.

getSuperInterfaceback to summary
public JClass getSuperInterface()

Gets the xjc:superInterface customization if it's turned on.

getTargetPackageback to summary
public JPackage getTargetPackage()

Gets the specified package name (options/@package).

interfacesback to summary
public Collection<BIInterface> interfaces()

Returns all BIInterfaces in a read-only set.

parseback to summary
private static Document parse(Model model, InputSource is, ErrorReceiver receiver) throws AbortException

Parses an InputSource into dom4j Document. Returns null in case of an exception.