com.sun.msv.grammar
Class AnyNameClass

java.lang.Object
  |
  +--com.sun.msv.grammar.NameClass
        |
        +--com.sun.msv.grammar.AnyNameClass
All Implemented Interfaces:
Serializable

public final class AnyNameClass
extends NameClass

a NameClass that matches any name.

Author:
Kohsuke KAWAGUCHI
See Also:
Serialized Form

Field Summary
static NameClass theInstance
          singleton instance
 
Fields inherited from class com.sun.msv.grammar.NameClass
LOCALNAME_WILDCARD, NAMESPACE_WILDCARD
 
Method Summary
 boolean accepts(String namespaceURI, String localName)
          AnyNameClass accpets any name, as its name suggests.
 String toString()
           
 Object visit(NameClassVisitor visitor)
          visitor pattern support
 
Methods inherited from class com.sun.msv.grammar.NameClass
accepts
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

theInstance

public static final NameClass theInstance
singleton instance
Method Detail

accepts

public boolean accepts(String namespaceURI,
                       String localName)
AnyNameClass accpets any name, as its name suggests.
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