com.sun.msv.grammar
Class ReferenceContainer
- Serializable
public abstract class ReferenceContainer
Container of ReferenceExp. a map from name to ReferenceExp.
ReferenceExp | _get(String name) - gets a referenced expression
Derived class should provide type-safe accesser methods.
|
ReferenceExp | _getOrCreate(String name) - gets or creates ReferenceExp object.
|
ReferenceExp[] | getAll() - obtains all items in this container.
|
Iterator | iterator() - iterates all ReferenceExp in this container
|
void | redefine(String name, ReferenceExp newExp) - replaces the current ReferenceExp by newly specified reference exp.
|
ReferenceExp | remove(String name) - removes an object from this container.
|
int | size() - gets the number of ReferenceExps in this container.
|
_get
public final ReferenceExp _get(String name)
gets a referenced expression
Derived class should provide type-safe accesser methods.
- null
if no expression is defined with the given name.
_getOrCreate
public final ReferenceExp _getOrCreate(String name)
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.
getAll
public final ReferenceExp[] getAll()
obtains all items in this container.
iterator
public final Iterator iterator()
iterates all ReferenceExp in this container
redefine
public void redefine(String name,
ReferenceExp newExp)
replaces the current ReferenceExp by newly specified reference exp.
remove
public final ReferenceExp remove(String name)
removes an object from this container.
- removed object. Null if no such name is found.
size
public final int size()
gets the number of ReferenceExps in this container.