com.sun.tools.xjc.reader.xmlschema.bindinfo

Class BIGlobalBinding

final class BIGlobalBinding extends AbstractDeclarationImpl

Global binding customization. The code is highly temporary.

One of the information contained in a global customization is the default binding for properties. This object contains a BIProperty object to keep this information.

Nested Class Summary
static classBIGlobalBinding.ClassNameAdapter
static classBIGlobalBinding.ClassNameBean
Used to unmarshal <[element] name="className" />
static classBIGlobalBinding.GlobalStandardConversion
Global <jaxb:javaType>.
static classBIGlobalBinding.GlobalVendorConversion
Global <xjc:javaType>.
Field Summary
booleanchoiceContentProperty
ImplStructureStrategycodeGenerationStrategy
The code generation strategy.
CollectionTypeAttributecollectionType
intdefaultEnumMemberSizeCap
Default cap to the number of constants in the enum.
BIPropertydefaultProperty
Gets the default defaultProperty customization.
Set<QName>enumBaseTypes
Set of datatype names.
booleanfixedAttributeAsConstantProperty
LocalScopingflattenClasses
If true, interfaces/classes that are normally generated as a nested interface/class will be generated into the package, allowing the generated classes to be flat.
booleangenerateElementClass
True to generate a class for elements by default.
BooleangenerateElementProperty
EnumMemberModegenerateEnumMemberName
Returns true if the compiler needs to generate type-safe enum member names when enumeration values cannot be used as constant names.
booleangenerateMixedExtensions
Map<QName,BIConversion>globalConversions
Globally-defined conversion customizations.
booleanisJavaNamingConventionEnabled
Returns true if the "isJavaNamingConventionEnabled" option is turned on.
NameConverternameConverter
Gets the name converter that will govern the XML->Java name conversion process for this compilation.
StringnoMarshaller
StringnoUnmarshaller
StringnoValidatingUnmarshaller
StringnoValidator
static QNameNAME
OptionalPropertyModeoptionalProperty
BISerializableserializable
Returns BISerializable if the extension is specified, or null otherwise.
StringsimpleMode
Generate the simpler optimized code, but not necessarily conforming to the spec.
booleansimpleTypeSubstitution
True to generate classes for every simple type.
BIGlobalBinding.ClassNameBeansuperClass
If <xjc:superClass> extension is specified, returns the specified root class.
BIGlobalBinding.ClassNameBeansuperInterface
If <xjc:superInterface> extension is specified, returns the specified root class.
StringtreatRestrictionLikeNewType
Handles complex type restriction as if it were a new type.
BIGlobalBinding.TypeSubstitutionElementtypeSubstitution
Constructor Summary
BIGlobalBinding()
Creates a bind info object with the default values
Method Summary
booleancanBeMappedToTypeSafeEnum(QName typeName)
Checks if the given XML Schema built-in type can be mapped to a type-safe enum class.
booleancanBeMappedToTypeSafeEnum(String nsUri, String localName)
booleancanBeMappedToTypeSafeEnum(XSDeclaration decl)
voiddispatchGlobalConversions(XSSchemaSet schema)
Moves global BIConversion to the right object.
voiderrorCheck()
Performs error check
ImplStructureStrategygetCodeGenerationStrategy()
intgetDefaultEnumMemberSizeCap()
BIPropertygetDefaultProperty()
EnumMemberModegetEnumMemberMode()
LocalScopinggetFlattenClasses()
QNamegetName()
BISerializablegetSerializable()
JDefinedClassgetSuperClass()
JDefinedClassgetSuperInterface()
BIGlobalBinding.UnderscoreBindinggetUnderscoreBinding()
booleanisChoiceContentPropertyEnabled()
booleanisEqual(BIGlobalBinding b)
booleanisGenerateElementClass()
booleanisGenerateMixedExtensions()
booleanisJavaNamingConventionEnabled()
booleanisRestrictionFreshType()
booleanisSimpleMode()
booleanisSimpleTypeSubstitution()
voidonSetOwner()
voidsetGenerateElementPropertyStd(boolean value)
voidsetGenerateIsSetMethod(boolean b)
voidsetGlobalConversions(BIGlobalBinding.GlobalStandardConversion[] convs)
voidsetGlobalConversions2(BIGlobalBinding.GlobalVendorConversion[] convs)
voidsetParent(BindInfo parent)
voidsetUnderscoreBinding(BIGlobalBinding.UnderscoreBinding ub)
voidsetXjcSerializable(BISerializable s)
Another 1.0 compatibility customization (but we accept it and treat it as serializable)

Field Detail

choiceContentProperty

boolean choiceContentProperty

codeGenerationStrategy

ImplStructureStrategy codeGenerationStrategy
The code generation strategy.

collectionType

CollectionTypeAttribute collectionType

defaultEnumMemberSizeCap

int defaultEnumMemberSizeCap
Default cap to the number of constants in the enum. We won't attempt to produce a type-safe enum by default if there are more enumeration facets than specified in this field.

defaultProperty

BIProperty defaultProperty
Gets the default defaultProperty customization.

enumBaseTypes

Set<QName> enumBaseTypes
Set of datatype names. For a type-safe enum class to be generated, the underlying XML datatype must be derived from one of the types in this set.

fixedAttributeAsConstantProperty

boolean fixedAttributeAsConstantProperty

flattenClasses

LocalScoping flattenClasses
If true, interfaces/classes that are normally generated as a nested interface/class will be generated into the package, allowing the generated classes to be flat. See Bug 4969415 for the motivation.

generateElementClass

boolean generateElementClass
True to generate a class for elements by default.

generateElementProperty

Boolean generateElementProperty

generateEnumMemberName

EnumMemberMode generateEnumMemberName
Returns true if the compiler needs to generate type-safe enum member names when enumeration values cannot be used as constant names.

generateMixedExtensions

boolean generateMixedExtensions

globalConversions

final Map<QName,BIConversion> globalConversions
Globally-defined conversion customizations.

See Also: BIGlobalBinding

isJavaNamingConventionEnabled

boolean isJavaNamingConventionEnabled
Returns true if the "isJavaNamingConventionEnabled" option is turned on. In this mode, the compiler is expected to apply XML-to-Java name conversion algorithm even to names given by customizations. This method is intended to be called by other BIXXX classes. The effect of this switch should be hidden inside this package. IOW, the reader.xmlschema package shouldn't be aware of this switch.

nameConverter

NameConverter nameConverter
Gets the name converter that will govern the XML->Java name conversion process for this compilation.

The "underscoreBinding" customization will determine the exact object returned from this method. The rest of XJC should just use the NameConverter interface.

Always non-null.

noMarshaller

String noMarshaller

noUnmarshaller

String noUnmarshaller

noValidatingUnmarshaller

String noValidatingUnmarshaller

noValidator

String noValidator

NAME

public static final QName NAME

optionalProperty

OptionalPropertyMode optionalProperty

serializable

BISerializable serializable
Returns BISerializable if the extension is specified, or null otherwise.

simpleMode

String simpleMode
Generate the simpler optimized code, but not necessarily conforming to the spec.

simpleTypeSubstitution

boolean simpleTypeSubstitution
True to generate classes for every simple type.

superClass

BIGlobalBinding.ClassNameBean superClass
If <xjc:superClass> extension is specified, returns the specified root class. Otherwise null.

superInterface

BIGlobalBinding.ClassNameBean superInterface
If <xjc:superInterface> extension is specified, returns the specified root class. Otherwise null.

treatRestrictionLikeNewType

String treatRestrictionLikeNewType
Handles complex type restriction as if it were a new type.

typeSubstitution

BIGlobalBinding.TypeSubstitutionElement typeSubstitution

Constructor Detail

BIGlobalBinding

public BIGlobalBinding()
Creates a bind info object with the default values

Method Detail

canBeMappedToTypeSafeEnum

public boolean canBeMappedToTypeSafeEnum(QName typeName)
Checks if the given XML Schema built-in type can be mapped to a type-safe enum class.

Parameters: typeName

canBeMappedToTypeSafeEnum

public boolean canBeMappedToTypeSafeEnum(String nsUri, String localName)

canBeMappedToTypeSafeEnum

public boolean canBeMappedToTypeSafeEnum(XSDeclaration decl)

dispatchGlobalConversions

public void dispatchGlobalConversions(XSSchemaSet schema)
Moves global BIConversion to the right object.

errorCheck

public void errorCheck()
Performs error check

getCodeGenerationStrategy

public ImplStructureStrategy getCodeGenerationStrategy()

getDefaultEnumMemberSizeCap

public int getDefaultEnumMemberSizeCap()

getDefaultProperty

public BIProperty getDefaultProperty()

getEnumMemberMode

public EnumMemberMode getEnumMemberMode()

getFlattenClasses

public LocalScoping getFlattenClasses()

getName

public QName getName()

getSerializable

public BISerializable getSerializable()

getSuperClass

public JDefinedClass getSuperClass()

getSuperInterface

public JDefinedClass getSuperInterface()

getUnderscoreBinding

BIGlobalBinding.UnderscoreBinding getUnderscoreBinding()

isChoiceContentPropertyEnabled

public boolean isChoiceContentPropertyEnabled()

isEqual

public boolean isEqual(BIGlobalBinding b)

isGenerateElementClass

public boolean isGenerateElementClass()

isGenerateMixedExtensions

public boolean isGenerateMixedExtensions()

isJavaNamingConventionEnabled

public boolean isJavaNamingConventionEnabled()

isRestrictionFreshType

public boolean isRestrictionFreshType()

isSimpleMode

public boolean isSimpleMode()

isSimpleTypeSubstitution

public boolean isSimpleTypeSubstitution()

onSetOwner

public void onSetOwner()

setGenerateElementPropertyStd

void setGenerateElementPropertyStd(boolean value)

setGenerateIsSetMethod

void setGenerateIsSetMethod(boolean b)

setGlobalConversions

void setGlobalConversions(BIGlobalBinding.GlobalStandardConversion[] convs)

setGlobalConversions2

void setGlobalConversions2(BIGlobalBinding.GlobalVendorConversion[] convs)

setParent

public void setParent(BindInfo parent)

setUnderscoreBinding

void setUnderscoreBinding(BIGlobalBinding.UnderscoreBinding ub)

setXjcSerializable

void setXjcSerializable(BISerializable s)
Another 1.0 compatibility customization (but we accept it and treat it as serializable)