Package org.glassfish.rmic.iiop
Class NameContext
- java.lang.Object
-
- org.glassfish.rmic.iiop.NameContext
-
class NameContext extends java.lang.ObjectA NameContext enables detection of strings which differ only in case.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classNameContext.Name
-
Field Summary
Fields Modifier and Type Field Description private booleanallowCollisionsprivate java.util.Hashtable<java.lang.String,NameContext.Name>table
-
Constructor Summary
Constructors Constructor Description NameContext(boolean allowCollisions)Construct a context.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.Stringadd(java.lang.String name)Add a name to this context.voidassertPut(java.lang.String name)Add a name to this context.voidclear()Remove all entries.static NameContextforName(java.lang.String name, boolean allowCollisions, BatchEnvironment env)Get a context for the given name.java.lang.Stringget(java.lang.String name)Get a name from the context.voidput(java.lang.String name)Add a name to this context..
-
-
-
Field Detail
-
table
private java.util.Hashtable<java.lang.String,NameContext.Name> table
-
allowCollisions
private final boolean allowCollisions
-
-
Method Detail
-
forName
public static NameContext forName(java.lang.String name, boolean allowCollisions, BatchEnvironment env)
Get a context for the given name. Name may be null, in which case this method will return the default context.
-
assertPut
public void assertPut(java.lang.String name) throws java.lang.ExceptionAdd 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:
java.lang.Exception
-
put
public void put(java.lang.String name)
Add a name to this context..
-
add
private java.lang.String add(java.lang.String name)
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
public java.lang.String get(java.lang.String name)
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.
-
-