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 StringlocalNameStringnamespaceURI-
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 booleanaccepts(String namespaceURI, String localName)checks if this name class accepts given namespace:localName pair.StringtoString()StringPairtoStringPair()Objectvisit(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:NameClasschecks if this name class accepts given namespace:localName pair.- Specified by:
acceptsin 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:NameClassvisitor pattern support
-
toStringPair
public StringPair toStringPair()
-
-