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

public final Class RawTypeSet

extends Object
Class Inheritance
Imports
java.util.HashSet, .List, .Set, jakarta.activation.MimeType, com.sun.tools.xjc.model.CElementPropertyInfo, .CReferencePropertyInfo, .CTypeRef, .Multiplicity, com.sun.tools.xjc.model.nav.NType, org.glassfish.jaxb.core.v2.model.core.Element, .ID, java.math.BigInteger

Set of Ref.
Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
RawTypeSet.Mode

Represents the possible binding option for this RawTypeSet.

public abstract static class
RawTypeSet.Ref

A reference to something.

Field Summary

Modifier and TypeField and Description
public final RawTypeSet.Mode
canBeTypeRefs

True if this type set can form references to types.

private CElementPropertyInfo.CollectionMode
public final Multiplicity
mul

The occurrence of the whole references.

public final Set<RawTypeSet.Ref>

Constructor Summary

AccessConstructor and Description
public
RawTypeSet(Set<RawTypeSet.Ref> refs, Multiplicity m)

Should be called from one of the raw type set builders.

Method Summary

Modifier and TypeMethod and Description
public void
public void
private RawTypeSet.Mode
canBeTypeRefs()

Returns true if refs can form refs of types.

public CElementPropertyInfo.CollectionMode
public MimeType
public ID
id()

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

canBeTypeRefsback to summary
public final RawTypeSet.Mode canBeTypeRefs

True if this type set can form references to types.

collectionModeback to summary
private CElementPropertyInfo.CollectionMode collectionMode
mulback to summary
public final Multiplicity mul

The occurrence of the whole references.

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

Constructor Detail

RawTypeSetback to summary
public RawTypeSet(Set<RawTypeSet.Ref> refs, Multiplicity m)

Should be called from one of the raw type set builders.

Method Detail

addToback to summary
public void addTo(CElementPropertyInfo prop)
addToback to summary
public void addTo(CReferencePropertyInfo prop)
canBeTypeRefsback to summary
private RawTypeSet.Mode canBeTypeRefs()

Returns true if refs can form refs of types. If there are multiple Refs with the same type, we cannot make them into type refs. Or if any of the Ref says they cannot be in type refs, we cannot do that either.

Todo

just checking if the refs are the same is not suffice. If two refs derive from each other, they cannot form a list of refs (because of a possible ambiguity).

getCollectionModeback to summary
public CElementPropertyInfo.CollectionMode getCollectionMode()
getExpectedMimeTypeback to summary
public MimeType getExpectedMimeType()
idback to summary
public ID id()
isRequiredback to summary
public boolean isRequired()
com.sun.tools.xjc.reader back to summary

public final Enum RawTypeSet.Mode

extends Enum<RawTypeSet.Mode>
Class Inheritance

Represents the possible binding option for this RawTypeSet.

Field Summary

Modifier and TypeField and Description
public static final RawTypeSet.Mode
CAN_BE_TYPEREF

This RawTypeSet can be either an reference property or an element property, and XJC recommends reference property.

public static final RawTypeSet.Mode
MUST_BE_REFERENCE

This RawTypeSet can be only bound to a reference property.

private final int
public static final RawTypeSet.Mode
SHOULD_BE_TYPEREF

This RawTypeSet can be either an reference property or an element property, and XJC recommends element property.

Constructor Summary

AccessConstructor and Description
private
Mode(int rank)

Method Summary

Modifier and TypeMethod and Description
pack-priv RawTypeSet.Mode
public static RawTypeSet.Mode
public static RawTypeSet.Mode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CAN_BE_TYPEREFback to summary
public static final RawTypeSet.Mode CAN_BE_TYPEREF

This RawTypeSet can be either an reference property or an element property, and XJC recommends reference property.

MUST_BE_REFERENCEback to summary
public static final RawTypeSet.Mode MUST_BE_REFERENCE

This RawTypeSet can be only bound to a reference property.

rankback to summary
private final int rank
SHOULD_BE_TYPEREFback to summary
public static final RawTypeSet.Mode SHOULD_BE_TYPEREF

This RawTypeSet can be either an reference property or an element property, and XJC recommends element property.

Constructor Detail

Modeback to summary
private Mode(int rank)

Method Detail

orback to summary
pack-priv RawTypeSet.Mode or(RawTypeSet.Mode that)
valueOfback to summary
public static RawTypeSet.Mode valueOf(String name)
valuesback to summary
public static RawTypeSet.Mode[] values()
com.sun.tools.xjc.reader back to summary

public abstract Class RawTypeSet.Ref

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.WildcardRef, com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.CClassRef, com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.CElementInfoRef, com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.XmlTypeRef, com.sun.tools.xjc.reader.relaxng.RawTypeSetBuilder.CClassInfoRef

A reference to something.

A Ref can be either turned into CTypeRef to form an element property, or Element to form a reference property.

Constructor Summary

AccessConstructor and Description
protected
Ref()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
protected abstract RawTypeSet.Mode

Returns:

false to veto.
canBeType
(RawTypeSet parent)

Can this be a type ref?

protected MimeType
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 abstract ID
id()

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

protected abstract boolean
protected abstract void
protected abstract CTypeRef
toTypeRef(CElementPropertyInfo
the property to which the returned CTypeRef will be added to.
ep
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Refback to summary
protected Ref()

Default constructor.

Method Detail

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

Can this be a type ref?

Returns:RawTypeSet.Mode

false to veto.

getExpectedMimeTypeback to summary
protected MimeType 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.

idback to summary
protected abstract ID id()

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

isListOfValuesback to summary
protected abstract boolean isListOfValues()
toElementRefback to summary
protected abstract void toElementRef(CReferencePropertyInfo prop)
toTypeRefback to summary
protected abstract CTypeRef toTypeRef(CElementPropertyInfo ep)
Parameters
ep:CElementPropertyInfo

the property to which the returned CTypeRef will be added to.