Package com.sun.msv.grammar
Class ReferenceContainer
java.lang.Object
com.sun.msv.grammar.ReferenceContainer
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RELAXModule.AttPoolContainer
,RELAXModule.ElementRulesContainer
,RELAXModule.HedgeRulesContainer
,RELAXModule.TagContainer
,TREXGrammar.RefContainer
,XMLSchemaSchema.AttributeDeclContainer
,XMLSchemaSchema.AttributeGroupContainer
,XMLSchemaSchema.ComplexTypeContainer
,XMLSchemaSchema.ElementDeclContainer
,XMLSchemaSchema.GroupDeclContainer
,XMLSchemaSchema.SimpleTypeContainer
Container of ReferenceExp. a map from name to ReferenceExp.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ReferenceExp
gets a referenced expression Derived class should provide type-safe accesser methods.final ReferenceExp
_getOrCreate
(String name) gets or creates ReferenceExp object.protected abstract ReferenceExp
createReference
(String name) creates a new reference object with given namefinal ReferenceExp[]
getAll()
obtains all items in this container.final Iterator
iterator()
iterates all ReferenceExp in this containervoid
redefine
(String name, ReferenceExp newExp) replaces the current ReferenceExp by newly specified reference exp.final ReferenceExp
removes an object from this container.final int
size()
gets the number of ReferenceExps in this container.
-
Field Details
-
impl
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
ReferenceContainer
public ReferenceContainer()
-
-
Method Details
-
_getOrCreate
gets or creates ReferenceExp object. Derived class should provide type-safe accesser methods. Usually, this method is only necessary for some kind of grammar loader. If you are programming an application over MSV,_get(String)
method is probably what you need. -
createReference
creates a new reference object with given name -
redefine
replaces the current ReferenceExp by newly specified reference exp. -
_get
gets a referenced expression Derived class should provide type-safe accesser methods.- Returns:
- null if no expression is defined with the given name.
-
iterator
iterates all ReferenceExp in this container -
getAll
obtains all items in this container. -
remove
removes an object from this container.- Returns:
- removed object. Null if no such name is found.
-
size
public final int size()gets the number of ReferenceExps in this container.
-