|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.relaxng.datatype.helpers.ParameterlessDatatypeBuilder
public final class ParameterlessDatatypeBuilder
Disabled: no SafeJ information.
Dummy implementation of DatatypeBuilder
.
This implementation can be used for Datatypes which have no parameters.
Any attempt to add parameters will be rejected.
Typical usage would be:
class MyDatatypeLibrary implements DatatypeLibrary { .... DatatypeBuilder createDatatypeBuilder( String typeName ) { return new ParameterleessDatatypeBuilder(createDatatype(typeName)); } .... }
Constructor Summary | |
---|---|
ParameterlessDatatypeBuilder(Datatype baseType)
|
Method Summary | |
---|---|
void |
addParameter(String name,
String strValue,
ValidationContext context)
Adds a new parameter. |
Datatype |
createDatatype()
Derives a new Datatype from a Datatype by parameters that were already set through the addParameter method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParameterlessDatatypeBuilder(Datatype baseType)
Method Detail |
---|
public void addParameter(String name, String strValue, ValidationContext context) throws DatatypeException
DatatypeBuilder
addParameter
in interface DatatypeBuilder
name
- The name of the parameter to be added.strValue
- The raw value of the parameter. Caller may not normalize
this value because any white space is potentially significant.context
- 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.
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.public Datatype createDatatype() throws DatatypeException
DatatypeBuilder
createDatatype
in interface DatatypeBuilder
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |