Package com.sun.tools.rngom.nc
Class NameClass
java.lang.Object
com.sun.tools.rngom.nc.NameClass
- All Implemented Interfaces:
ParsedNameClass,Serializable
- Direct Known Subclasses:
AnyNameExceptNameClass,ChoiceNameClass,NsNameClass,NsNameExceptNameClass,SimpleNameClass
Name class is a set of
QNames.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract <V> Vaccept(NameClassVisitor<V> visitor) Visitor pattern support.abstract booleanReturns true if the givenQNameis a valid name for this QName.abstract intcontainsSpecificity(QName name) final booleanhasOverlapWith(NameClass nc2) Returns true if the intersection between this name class and the specified name class is non-empty.abstract booleanisOpen()Returns true if the name class accepts infinite number ofQNames.If the name class is closed (IOW !isOpen()), return the set of names in this name class.
-
Field Details
-
ANY
Sigleton instance that represents "anyName". -
NULL
Sigleton instance that accepts no name.This instance is useful when doing boolean arithmetic over name classes (such as computing an inverse of a given name class, etc), even though it can never appear in a RELAX NG surface syntax.
Internally, this instance is also used for:
- Used to recover from errors during parsing.
- Mark element patterns with
<notAllowed/>content model.
-
-
Constructor Details
-
NameClass
public NameClass()
-
-
Method Details
-
contains
Returns true if the givenQNameis a valid name for this QName. -
containsSpecificity
-
accept
Visitor pattern support. -
isOpen
public abstract boolean isOpen()Returns true if the name class accepts infinite number ofQNames.Intuitively, this method returns true if the name class is some sort of wildcard.
-
listNames
If the name class is closed (IOW !isOpen()), return the set of names in this name class. Otherwise the behavior is undefined. -
hasOverlapWith
Returns true if the intersection between this name class and the specified name class is non-empty.
-