Top Description Methods
com.sun.tools.rngdatatype

public Interface DatatypeBuilder

Known Direct Implementers
com.sun.tools.rngdatatype.helpers.ParameterlessDatatypeBuilder, com.sun.tools.rngom.dt.builtin.BuiltinDatatypeBuilder

Creates a user-defined type by adding parameters to the pre-defined type.
Authors
James Clark, Kohsuke KAWAGUCHI

Method Summary

Modifier and TypeMethod and Description
public void
addParameter(String
The name of the parameter to be added.
name
,
String
The raw value of the parameter. Caller may not normalize this value because any white space is potentially significant.
strValue
,
ValidationContext
The context information which can be used by the callee to acquire additional information. This context object is valid only during this method call. The callee may not keep a reference to this object.
context
)

Adds a new parameter.

public Datatype
createDatatype()

Derives a new Datatype from a Datatype by parameters that were already set through the addParameter method.

Method Detail

addParameterback to summary
public void addParameter(String name, String strValue, ValidationContext context) throws DatatypeException

Adds a new parameter.

Parameters
name:String

The name of the parameter to be added.

strValue:String

The raw value of the parameter. Caller may not normalize this value because any white space is potentially significant.

context:ValidationContext

The context information which can be used by the callee to acquire additional information. This context object is valid only during this method call. The callee may not keep a reference to this object.

Exceptions
DatatypeException:
When the given parameter is inappropriate for some reason. The callee is responsible to recover from this error. That is, the object should behave as if no such error was occured.
createDatatypeback to summary
public Datatype createDatatype() throws DatatypeException

Derives a new Datatype from a Datatype by parameters that were already set through the addParameter method.

Exceptions
DatatypeException:
DatatypeException must be thrown if the derivation is somehow invalid. For example, a required parameter is missing, etc. The exception should contain a diagnosis message if possible.