com.sun.msv.grammar
Class ChoiceNameClass
java.lang.Object
|
+--com.sun.msv.grammar.NameClass
|
+--com.sun.msv.grammar.ChoiceNameClass
- All Implemented Interfaces:
- Serializable
- public class ChoiceNameClass
- extends NameClass
Union of two NameClasses.
- Author:
- Kohsuke KAWAGUCHI
- See Also:
- Serialized Form
nc1
public final NameClass nc1
nc2
public final NameClass nc2
ChoiceNameClass
public ChoiceNameClass(NameClass nc1,
NameClass nc2)
accepts
public boolean accepts(String namespaceURI,
String localPart)
- accepts a name if it is accepted by nc1 or nc2.
- Overrides:
accepts
in class NameClass
- Following copied from class:
com.sun.msv.grammar.NameClass
- Parameters:
namespaceURI
- namespace URI to be tested. If this value equals to
NAMESPACE_WILDCARD, implementation must assume that
valid namespace is specified. this twist will be used for
error diagnosis.localName
- local part to be tested. As with namespaceURI, LOCALNAME_WILDCARD
will acts as a wild card.- Returns:
- true if the pair is accepted,
false otherwise.
visit
public Object visit(NameClassVisitor visitor)
- Description copied from class:
NameClass
- visitor pattern support
- Overrides:
visit
in class NameClass
toString
public String toString()
- Overrides:
toString
in class Object