Class NameContext

java.lang.Object
org.glassfish.rmic.iiop.NameContext

class NameContext extends Object
A NameContext enables detection of strings which differ only in case.
  • Field Details

  • 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

      public static NameContext forName(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(String name) throws Exception
      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

      public void put(String name)
      Add a name to this context..
    • add

      private String add(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 String get(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.