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

public Class RawTypeSetBuilder

extends Object
implements XSTermVisitor
Class Inheritance
All Implemented Interfaces
com.sun.xml.xsom.visitor.XSTermVisitor
Imports
java.util.LinkedHashSet, .Set, jakarta.activation.MimeType, javax.xml.namespace.QName, com.sun.tools.xjc.model.CAdapter, .CClass, .CClassInfo, .CCustomizations, .CElement, .CElementInfo, .CElementPropertyInfo, .CReferencePropertyInfo, .CTypeRef, .Model, .Multiplicity, .TypeUse, com.sun.tools.xjc.reader.RawTypeSet, .Ring, com.sun.tools.xjc.reader.xmlschema.bindinfo.BIDom, .BIGlobalBinding, .BIXSubstitutable, org.glassfish.jaxb.core.v2.model.core.ID, .WildcardMode, com.sun.xml.xsom.XSElementDecl, .XSModelGroup, .XSModelGroupDecl, .XSParticle, .XSWildcard, com.sun.xml.xsom.visitor.XSTermVisitor

Builds RawTypeSet for XML Schema.
Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
RawTypeSetBuilder.CClassRef

Reference to a class that maps from an element.

public class
RawTypeSetBuilder.CElementInfoRef

Reference to a class that maps from an element.

public static class
RawTypeSetBuilder.WildcardRef

Reference to a wildcard.

public static class
RawTypeSetBuilder.XmlTypeRef

References to a type.

Field Summary

Modifier and TypeField and Description
protected final BGMBuilder
private final Set<QName>
elementNames

To avoid declaring the same element twice for a content model like (A,A), we keep track of element names here while we are building up this instance.

private final Set<RawTypeSet.Ref>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static RawTypeSet
build(XSParticle p, boolean
if this whole property is optional due to the occurrence constraints on ancestors, set this to true. this will prevent the primitive types to be generated.
optional
)

public void
public Set<RawTypeSet.Ref>
getRefs()

Gets the RawTypeSet.Refs that were built.

public void
public void
private void
particle(XSParticle p)

Build up refs and compute the total multiplicity of this RawTypeSet.Ref set.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

builderback to summary
protected final BGMBuilder builder
elementNamesback to summary
private final Set<QName> elementNames

To avoid declaring the same element twice for a content model like (A,A), we keep track of element names here while we are building up this instance.

refsback to summary
private final Set<RawTypeSet.Ref> refs

Constructor Detail

RawTypeSetBuilderback to summary
public RawTypeSetBuilder()

Method Detail

buildback to summary
public static RawTypeSet build(XSParticle p, boolean optional)
Parameters
optional:boolean

if this whole property is optional due to the occurrence constraints on ancestors, set this to true. this will prevent the primitive types to be generated.

elementDeclback to summary
public void elementDecl(XSElementDecl decl)

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

Annotations
@Override
getRefsback to summary
public Set<RawTypeSet.Ref> getRefs()

Gets the RawTypeSet.Refs that were built.

modelGroupback to summary
public void modelGroup(XSModelGroup group)

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

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

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

Annotations
@Override
particleback to summary
private void particle(XSParticle p)

Build up refs and compute the total multiplicity of this RawTypeSet.Ref set.

wildcardback to summary
public void wildcard(XSWildcard wc)

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

Annotations
@Override
com.sun.tools.xjc.reader.xmlschema back to summary

public final Class RawTypeSetBuilder.CClassRef

extends Ref
Class Inheritance

Reference to a class that maps from an element.

Field Summary

Modifier and TypeField and Description
public final XSElementDecl
public final CClass

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected RawTypeSet.Mode
canBeType(RawTypeSet parent)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Can this be a type ref?

protected ID
id()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property is ID or not.

protected boolean
protected void
protected CTypeRef
Inherited from com.sun.tools.xjc.reader.RawTypeSet.Ref:
getExpectedMimeType

Field Detail

declback to summary
public final XSElementDecl decl
targetback to summary
public final CClass target

Constructor Detail

CClassRefback to summary
pack-priv CClassRef(XSElementDecl decl, CClass target)

Method Detail

canBeTypeback to summary
protected RawTypeSet.Mode canBeType(RawTypeSet parent)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Can this be a type ref?

Annotations
@Override
idback to summary
protected ID id()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property is ID or not.

Annotations
@Override
isListOfValuesback to summary
protected boolean isListOfValues()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.isListOfValues.

Annotations
@Override
toElementRefback to summary
protected void toElementRef(CReferencePropertyInfo prop)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toElementRef.

Annotations
@Override
toTypeRefback to summary
protected CTypeRef toTypeRef(CElementPropertyInfo ep)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toTypeRef.

Annotations
@Override
com.sun.tools.xjc.reader.xmlschema back to summary

public final Class RawTypeSetBuilder.CElementInfoRef

extends Ref
Class Inheritance

Reference to a class that maps from an element.

Field Summary

Modifier and TypeField and Description
public final XSElementDecl
public final CElementInfo

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected RawTypeSet.Mode
canBeType(RawTypeSet parent)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Can this be a type ref?

protected MimeType
getExpectedMimeType()

Overrides com.sun.tools.xjc.reader.RawTypeSet.Ref.getExpectedMimeType.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property has an associated expected MIME type or not.

protected ID
id()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property is ID or not.

protected boolean
protected void
protected CTypeRef

Field Detail

declback to summary
public final XSElementDecl decl
targetback to summary
public final CElementInfo target

Constructor Detail

CElementInfoRefback to summary
pack-priv CElementInfoRef(XSElementDecl decl, CElementInfo target)

Method Detail

canBeTypeback to summary
protected RawTypeSet.Mode canBeType(RawTypeSet parent)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Can this be a type ref?

Annotations
@Override
getExpectedMimeTypeback to summary
protected MimeType getExpectedMimeType()

Overrides com.sun.tools.xjc.reader.RawTypeSet.Ref.getExpectedMimeType.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.getExpectedMimeType.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property has an associated expected MIME type or not.

Annotations
@Override
idback to summary
protected ID id()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property is ID or not.

Annotations
@Override
isListOfValuesback to summary
protected boolean isListOfValues()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.isListOfValues.

Annotations
@Override
toElementRefback to summary
protected void toElementRef(CReferencePropertyInfo prop)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toElementRef.

Annotations
@Override
toTypeRefback to summary
protected CTypeRef toTypeRef(CElementPropertyInfo ep)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toTypeRef.

Annotations
@Override
com.sun.tools.xjc.reader.xmlschema back to summary

public final Class RawTypeSetBuilder.WildcardRef

extends Ref
Class Inheritance

Reference to a wildcard.

Field Summary

Modifier and TypeField and Description
private final WildcardMode

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected RawTypeSet.Mode
canBeType(RawTypeSet parent)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Can this be a type ref?

private static WildcardMode
getMode(XSWildcard wildcard)

protected ID
id()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property is ID or not.

protected boolean
protected void
protected CTypeRef
Inherited from com.sun.tools.xjc.reader.RawTypeSet.Ref:
getExpectedMimeType

Field Detail

modeback to summary
private final WildcardMode mode

Constructor Detail

WildcardRefback to summary
pack-priv WildcardRef(XSWildcard wildcard)
WildcardRefback to summary
pack-priv WildcardRef(WildcardMode mode)

Method Detail

canBeTypeback to summary
protected RawTypeSet.Mode canBeType(RawTypeSet parent)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Can this be a type ref?

Annotations
@Override
getModeback to summary
private static WildcardMode getMode(XSWildcard wildcard)
idback to summary
protected ID id()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property is ID or not.

Annotations
@Override
isListOfValuesback to summary
protected boolean isListOfValues()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.isListOfValues.

Annotations
@Override
toElementRefback to summary
protected void toElementRef(CReferencePropertyInfo prop)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toElementRef.

Annotations
@Override
toTypeRefback to summary
protected CTypeRef toTypeRef(CElementPropertyInfo ep)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toTypeRef.

Annotations
@Override
com.sun.tools.xjc.reader.xmlschema back to summary

public final Class RawTypeSetBuilder.XmlTypeRef

extends Ref
Class Inheritance

References to a type. Could be global or local.

Field Summary

Modifier and TypeField and Description
private final XSElementDecl
private final TypeUse

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected RawTypeSet.Mode
canBeType(RawTypeSet parent)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Can this be a type ref?

protected MimeType
getExpectedMimeType()

Overrides com.sun.tools.xjc.reader.RawTypeSet.Ref.getExpectedMimeType.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property has an associated expected MIME type or not.

protected ID
id()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property is ID or not.

protected boolean
protected void
toElementRef(CReferencePropertyInfo prop)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toElementRef.

The whole type set can be later bound to a reference property, in which case we need to generate additional code to wrap this type reference into an element class.

protected CTypeRef

Field Detail

declback to summary
private final XSElementDecl decl
targetback to summary
private final TypeUse target

Constructor Detail

XmlTypeRefback to summary
public XmlTypeRef(XSElementDecl decl)

Method Detail

canBeTypeback to summary
protected RawTypeSet.Mode canBeType(RawTypeSet parent)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.canBeType.

Can this be a type ref?

Annotations
@Override
getExpectedMimeTypeback to summary
protected MimeType getExpectedMimeType()

Overrides com.sun.tools.xjc.reader.RawTypeSet.Ref.getExpectedMimeType.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.getExpectedMimeType.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property has an associated expected MIME type or not.

Annotations
@Override
idback to summary
protected ID id()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

Doc from com.sun.tools.xjc.reader.RawTypeSet.Ref.id.

When this RawTypeSet binds to a CElementPropertyInfo, this method is used to determine if the property is ID or not.

Annotations
@Override
isListOfValuesback to summary
protected boolean isListOfValues()

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.isListOfValues.

Annotations
@Override
toElementRefback to summary
protected void toElementRef(CReferencePropertyInfo prop)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toElementRef.

The whole type set can be later bound to a reference property, in which case we need to generate additional code to wrap this type reference into an element class. This method generates such an element class and returns it.

Annotations
@Override
toTypeRefback to summary
protected CTypeRef toTypeRef(CElementPropertyInfo ep)

Implements abstract com.sun.tools.xjc.reader.RawTypeSet.Ref.toTypeRef.

Annotations
@Override