Top Description Fields Constructors Methods
com.sun.tools.xjc.reader.xmlschema

pack-priv final Class DefaultClassBinder

extends Object
implements ClassBinder
Class Inheritance
All Implemented Interfaces
com.sun.tools.xjc.reader.xmlschema.ClassBinder, com.sun.xml.xsom.visitor.XSFunction, com.sun.xml.xsom.visitor.XSTermFunction, com.sun.xml.xsom.visitor.XSContentTypeFunction
Static Imports
com.sun.tools.xjc.reader.xmlschema.BGMBuilder.getName

Default classBinder implementation. Honors <jaxb:class> customizations and default bindings.

Field Summary

Modifier and TypeField and Description
protected final BGMBuilder
private final Model
protected final XSSchemaSet
protected final ClassSelector
private final SimpleTypeBuilder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private CElement
allow(XSComponent component, String
The token which will be used as the basis of the class name if the class name is not specified in the customization. This is usually the name of an element declaration, and so on. This parameter can be null, in that case it would be an error if a name is not given by the customization.
defaultBaseName
)

Checks if a component carries a customization to map it to a class.

public CClassInfo
public CElement
public CElement
public CClassInfo
public CElement
private String
deriveName(XSDeclaration comp)

Derives a name from a schema component.

private String
deriveName(XSComplexType comp)

Derives a name from a schema component.

public CElement
public CClassInfo
public CClassInfo
private BIGlobalBinding
private XSElementDecl
getSoleElementReferer(XSType t)

If only one global XSElementDecl is refering to XSType, return that element, otherwise null.

private QName
public CClassInfo
private boolean
isCollapsable(XSElementDecl decl)

Returns true if the complex type of the given element can be "optimized away" and unified with its parent element decl to form a single class.

public CElement
public CElement
private CClassInfo

Returns:

return value is unused. Since most of the caller needs to return null, to make the code a little bit shorter, this method always return null (so that the caller can always say return never(sc);.
never
()

Makes sure that the component doesn't carry a BIClass customization.

public CClassInfo
public CClassInfo
public CClassInfo
public CElement
public CClassInfo
public CClassInfo
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

builderback to summary
protected final BGMBuilder builder
modelback to summary
private final Model model
schemasback to summary
protected final XSSchemaSet schemas
selectorback to summary
protected final ClassSelector selector
stbback to summary
private final SimpleTypeBuilder stb

Constructor Detail

DefaultClassBinderback to summary
pack-priv DefaultClassBinder()

Method Detail

allowback to summary
private CElement allow(XSComponent component, String defaultBaseName)

Checks if a component carries a customization to map it to a class. If so, make it a class.

Parameters
defaultBaseName:String

The token which will be used as the basis of the class name if the class name is not specified in the customization. This is usually the name of an element declaration, and so on. This parameter can be null, in that case it would be an error if a name is not given by the customization.

annotationback to summary
public CClassInfo annotation(XSAnnotation annon)

Implements com.sun.xml.xsom.visitor.XSFunction.annotation.

Annotations
@Override
attGroupDeclback to summary
public CElement attGroupDecl(XSAttGroupDecl decl)

Implements com.sun.xml.xsom.visitor.XSFunction.attGroupDecl.

Annotations
@Override
attributeDeclback to summary
public CElement attributeDecl(XSAttributeDecl decl)

Implements com.sun.xml.xsom.visitor.XSFunction.attributeDecl.

Annotations
@Override
attributeUseback to summary
public CClassInfo attributeUse(XSAttributeUse use)

Implements com.sun.xml.xsom.visitor.XSFunction.attributeUse.

Annotations
@Override
complexTypeback to summary
public CElement complexType(XSComplexType type)

Implements com.sun.xml.xsom.visitor.XSFunction.complexType.

Annotations
@Override
deriveNameback to summary
private String deriveName(XSDeclaration comp)

Derives a name from a schema component. Use the name of the schema component as the default name.

deriveNameback to summary
private String deriveName(XSComplexType comp)

Derives a name from a schema component. For complex types, we take redefinition into account when deriving a default name.

elementDeclback to summary
public CElement elementDecl(XSElementDecl decl)

Implements com.sun.xml.xsom.visitor.XSTermFunction.elementDecl.

Annotations
@Override
emptyback to summary
public CClassInfo empty(XSContentType ct)

Implements com.sun.xml.xsom.visitor.XSContentTypeFunction.empty.

Annotations
@Override
facetback to summary
public CClassInfo facet(XSFacet decl)

Implements com.sun.xml.xsom.visitor.XSFunction.facet.

Annotations
@Override
getGlobalBindingback to summary
private BIGlobalBinding getGlobalBinding()
getSoleElementRefererback to summary
private XSElementDecl getSoleElementReferer(XSType t)

If only one global XSElementDecl is refering to XSType, return that element, otherwise null.

Annotations
@Nullable
getTypeNameback to summary
private QName getTypeName(XSComplexType type)
identityConstraintback to summary
public CClassInfo identityConstraint(XSIdentityConstraint xsIdentityConstraint)

Implements com.sun.xml.xsom.visitor.XSFunction.identityConstraint.

Annotations
@Override
isCollapsableback to summary
private boolean isCollapsable(XSElementDecl decl)

Returns true if the complex type of the given element can be "optimized away" and unified with its parent element decl to form a single class.

modelGroupback to summary
public CElement modelGroup(XSModelGroup mgroup)

Implements com.sun.xml.xsom.visitor.XSTermFunction.modelGroup.

Annotations
@Override
modelGroupDeclback to summary
public CElement modelGroupDecl(XSModelGroupDecl decl)

Implements com.sun.xml.xsom.visitor.XSTermFunction.modelGroupDecl.

Annotations
@Override
neverback to summary
private CClassInfo never()

Makes sure that the component doesn't carry a BIClass customization.

Returns:CClassInfo

return value is unused. Since most of the caller needs to return null, to make the code a little bit shorter, this method always return null (so that the caller can always say return never(sc);.

notationback to summary
public CClassInfo notation(XSNotation not)

Implements com.sun.xml.xsom.visitor.XSFunction.notation.

Annotations
@Override
particleback to summary
public CClassInfo particle(XSParticle particle)

Implements com.sun.xml.xsom.visitor.XSContentTypeFunction.particle.

Annotations
@Override
schemaback to summary
public CClassInfo schema(XSSchema schema)

Implements com.sun.xml.xsom.visitor.XSFunction.schema.

Annotations
@Override
simpleTypeback to summary
public CElement simpleType(XSSimpleType type)

Implements com.sun.xml.xsom.visitor.XSContentTypeFunction.simpleType.

Annotations
@Override
wildcardback to summary
public CClassInfo wildcard(XSWildcard wc)

Implements com.sun.xml.xsom.visitor.XSTermFunction.wildcard.

Annotations
@Override
xpathback to summary
public CClassInfo xpath(XSXPath xsxPath)

Implements com.sun.xml.xsom.visitor.XSFunction.xpath.

Annotations
@Override