Class SimpleName.Scoped

  • All Implemented Interfaces:
    Serializable, Comparable<GenericName>, GenericName, ScopedName
    Enclosing class:
    SimpleName

    public static class SimpleName.Scoped
    extends SimpleName
    implements ScopedName
    A ScopedName specialization of SimpleName. The JNDI name wrapped by this class shall contain more than one component.
    See Also:
    Serialized Form
    • Constructor Detail

      • Scoped

        public Scoped​(SimpleNameSpace scope,
                      Name name)
               throws IllegalArgumentException
        Creates a new instance backed by the given JNDI name. This constructor does not clone the given JNDI name. While this implementation is robust to change in the wrapped object, it is a better practice to keep the JNDI name unmodified after SimpleName construction.
        Parameters:
        scope - the scope (name space) in which the given name is local, or null.
        name - the JNDI name wrapped by this SimpleName (not cloned).
        Throws:
        IllegalArgumentException - if the given name has less than 2 components.
    • Method Detail

      • tail

        public GenericName tail()
        Returns every elements of the parsed names list except for the head. This implementation creates a new generic name from the JNDI name suffix.
        Specified by:
        tail in interface ScopedName
        See Also:
        Name.getSuffix(int)
      • path

        public GenericName path()
        Returns every elements of the parsed names list except for the tip. This implementation creates a new generic name from the JNDI name prefix.
        Specified by:
        path in interface ScopedName
        See Also:
        Name.getPrefix(int)