Package org.glassfish.rmic.iiop
Class NameContext
java.lang.Object
org.glassfish.rmic.iiop.NameContext
A NameContext enables detection of strings which differ only
in case.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private Hashtable
<String, NameContext.Name> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
Add a name to this context.void
Add a name to this context.void
clear()
Remove all entries.static NameContext
forName
(String name, boolean allowCollisions, BatchEnvironment env) Get a context for the given name.Get a name from the context.void
Add a name to this context..
-
Field Details
-
table
-
allowCollisions
private final boolean allowCollisions
-
-
Constructor Details
-
NameContext
public NameContext(boolean allowCollisions) Construct a context.- Parameters:
allowCollisions
- true if case-sensitive name collisions are allowed, false if not.
-
-
Method Details
-
forName
Get a context for the given name. Name may be null, in which case this method will return the default context. -
assertPut
Add a name to this context. If constructed with allowCollisions false and a collision occurs, this method will throw an exception in which the message contains the string: "name" and "collision".- Throws:
Exception
-
put
Add a name to this context.. -
add
Add a name to this context. If constructed with allowCollisions false and a collision occurs, this method will return a message string, otherwise returns null. -
get
Get a name from the context. If it has collisions, the name will be converted as specified in section 5.2.7. -
clear
public void clear()Remove all entries.
-