com.sun.msv.reader.datatype.xsd

Class XSDatatypeExp

public class XSDatatypeExp extends ReferenceExp implements GrammarReader.BackPatch

A wrapper of XSDatatype that serves as an expression and encapsulates lazy-constructed datatypes.

Author: Kohsuke KAWAGUCHI

Nested Class Summary
interfaceXSDatatypeExp.Renderer
this object renders the actual datatype object.
static classXSDatatypeExp.RenderingContext
this object is used to keep the information about the dependency between late-bind datatype objects.
Constructor Summary
XSDatatypeExp(XSDatatype dt, ExpressionPool _pool)
Creates this object from existing XSDatatype.
XSDatatypeExp(String nsUri, String typeName, GrammarReader reader, XSDatatypeExp.Renderer _renderer)
Creates lazily created datatype.
Method Summary
XSDatatypeExpcreateFinalizedType(int finalValue, GrammarReader reader)
Derives a new type by setting final values.
XSTypeIncubatorcreateIncubator()
Creates an incubator so that the caller can add more facets and derive a new type.
XSDatatypeExpgetClone()
Gets a clone of this object.
XSDatatypegetCreatedType()
Gets a encapsulated datatype object This method can be called only after all the datatypes are created.

Some of the datatypes are lazily during the back-patching phase.

StategetOwnerState()
XSDatatypegetType(XSDatatypeExp.RenderingContext context)
Gets the type definition.
booleanisLateBind()
static XSDatatypeExpmakeList(String nsUri, String typeName, XSDatatypeExp itemType, GrammarReader reader)
Derives a new type by list.
static XSDatatypeExpmakeUnion(String typeNameUri, String typeName, Collection members, GrammarReader reader)
Derives a new type by union.
voidpatch()
Renders the type (GrammarReader.BackPatch implementation).
voidredefine(XSDatatypeExp rhs)
Updates this object by copying the state from rhs

Constructor Detail

XSDatatypeExp

public XSDatatypeExp(XSDatatype dt, ExpressionPool _pool)
Creates this object from existing XSDatatype.

XSDatatypeExp

public XSDatatypeExp(String nsUri, String typeName, GrammarReader reader, XSDatatypeExp.Renderer _renderer)
Creates lazily created datatype.

Method Detail

createFinalizedType

public XSDatatypeExp createFinalizedType(int finalValue, GrammarReader reader)
Derives a new type by setting final values.

createIncubator

public XSTypeIncubator createIncubator()
Creates an incubator so that the caller can add more facets and derive a new type.

getClone

public XSDatatypeExp getClone()
Gets a clone of this object.

getCreatedType

public XSDatatype getCreatedType()
Gets a encapsulated datatype object This method can be called only after all the datatypes are created.

Some of the datatypes are lazily during the back-patching phase.

getOwnerState

public State getOwnerState()

getType

public XSDatatype getType(XSDatatypeExp.RenderingContext context)
Gets the type definition. This method renders the datatype object if it's not rendered yet. Internal use only.

isLateBind

public final boolean isLateBind()

makeList

public static XSDatatypeExp makeList(String nsUri, String typeName, XSDatatypeExp itemType, GrammarReader reader)
Derives a new type by list.

makeUnion

public static XSDatatypeExp makeUnion(String typeNameUri, String typeName, Collection members, GrammarReader reader)
Derives a new type by union.

patch

public void patch()
Renders the type (GrammarReader.BackPatch implementation).

redefine

public void redefine(XSDatatypeExp rhs)
Updates this object by copying the state from rhs