Package com.sun.msv.grammar
Class SimpleNameClass
- java.lang.Object
-
- com.sun.msv.grammar.NameClass
-
- com.sun.msv.grammar.SimpleNameClass
-
- All Implemented Interfaces:
Serializable
public final class SimpleNameClass extends NameClass
a NameClass that accepts only one fixed name.- Author:
- Kohsuke KAWAGUCHI
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description String
localName
String
namespaceURI
-
Fields inherited from class com.sun.msv.grammar.NameClass
ALL, LOCALNAME_WILDCARD, NAMESPACE_WILDCARD, NONE
-
-
Constructor Summary
Constructors Constructor Description SimpleNameClass(StringPair name)
SimpleNameClass(String namespaceURI, String localName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(String namespaceURI, String localName)
checks if this name class accepts given namespace:localName pair.String
toString()
StringPair
toStringPair()
Object
visit(NameClassVisitor visitor)
visitor pattern support
-
-
-
Constructor Detail
-
SimpleNameClass
public SimpleNameClass(StringPair name)
-
-
Method Detail
-
accepts
public boolean accepts(String namespaceURI, String localName)
Description copied from class:NameClass
checks if this name class accepts given namespace:localName pair.- Specified by:
accepts
in classNameClass
- 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
-
toStringPair
public StringPair toStringPair()
-
-