Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

javax::naming::Name Class Reference

The Name interface represents a generic name -- an ordered sequence of components. More...

#include <javax_naming_Name.h>

Inheritance diagram for javax::naming::Name:

Inheritance graph
[legend]
Collaboration diagram for javax::naming::Name:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9,
  xmogBuildNumber = 2047
}
typedef ::xmog_java_array_template<
::javax::naming::Name
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::javax::naming::Name > > 
array2D

Public Member Functions

virtual ::javax::naming::Name add (jint posn, const ::java::lang::String &comp,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Adds a single component at a specified position within this name.
virtual ::javax::naming::Name add (const ::java::lang::String &comp,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Adds a single component to the end of this name.
virtual ::javax::naming::Name addAll (jint posn, const ::javax::naming::Name &n,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Adds the components of a name -- in order -- at a specified position within this name.
virtual ::javax::naming::Name addAll (const ::javax::naming::Name &suffix,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Adds the components of a name -- in order -- to the end of this name.
virtual ::java::lang::Object clone (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Generates a new copy of this name.
virtual jint compareTo (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Compares this name with another name for order.
virtual bool endsWith (const ::javax::naming::Name &n,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Determines whether this name ends with a specified suffix.
virtual ::java::lang::String get (jint posn,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Retrieves a component of this name.
virtual ::java::util::Enumeration getAll (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Retrieves the components of this name as an enumeration of strings.
virtual ::javax::naming::Name getPrefix (jint posn,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Creates a name whose components consist of a prefix of the components of this name.
virtual ::javax::naming::Name getSuffix (jint posn,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Creates a name whose components consist of a suffix of the components in this name.
virtual bool isEmpty (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Determines whether this name is empty.
virtual ::java::lang::Object remove (jint posn,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Removes a component from this name.
virtual jint size (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the number of components in this name.
virtual bool startsWith (const ::javax::naming::Name &n,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Determines whether this name starts with a specified prefix.

Detailed Description

The Name interface represents a generic name -- an ordered sequence of components.

It can be a composite name (names that span multiple namespaces), or a compound name (names that are used within individual hierarchical naming systems).

There can be different implementations of Name; for example, composite names, URLs, or namespace-specific compound names.

The components of a name are numbered. The indexes of a name with N components range from 0 up to, but not including, N. This range may be written as [0,N). The most significant component is at index 0. An empty name has no components.

None of the methods in this interface accept null as a valid value for a parameter that is a name or a name component. Likewise, methods that return a name or name component never return null.

An instance of a Name may not be synchronized against concurrent multithreaded access if that access is not read-only.

Author:
Rosanna Lee

Scott Seligman

R. Vasudevan


Member Function Documentation

virtual ::javax::naming::Name javax::naming::Name::add jint  posn,
const ::java::lang::String comp,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Adds a single component at a specified position within this name.

Components of this name at or after the index of the new component are shifted up by one (away from index 0) to accommodate the new component.

Parameters:
posn the component to add
comp the index at which to add the new component. Must be in the range [0,size()].
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the updated name (not a new one)

virtual ::javax::naming::Name javax::naming::Name::add const ::java::lang::String comp,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Adds a single component to the end of this name.

Parameters:
comp the component to add
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the updated name (not a new one)

virtual ::javax::naming::Name javax::naming::Name::addAll jint  posn,
const ::javax::naming::Name n,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Adds the components of a name -- in order -- at a specified position within this name.

Components of this name at or after the index of the first new component are shifted up (away from 0) to accommodate the new components.

Parameters:
posn the components to add
n the index in this name at which to add the new components. Must be in the range [0,size()].
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the updated name (not a new one)

virtual ::javax::naming::Name javax::naming::Name::addAll const ::javax::naming::Name suffix,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Adds the components of a name -- in order -- to the end of this name.

Parameters:
suffix the components to add
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the updated name (not a new one)

virtual ::java::lang::Object javax::naming::Name::clone ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Generates a new copy of this name.

Subsequent changes to the components of this name will not affect the new copy, and vice versa.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
a copy of this name

virtual jint javax::naming::Name::compareTo const ::java::lang::Object obj,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Compares this name with another name for order.

Returns a negative integer, zero, or a positive integer as this name is less than, equal to, or greater than the given name.

As with Object.equals(), the notion of ordering for names depends on the class that implements this interface. For example, the ordering may be based on lexicographical ordering of the name components. Specific attributes of the name, such as how it treats case, may affect the ordering. In general, two names of different classes may not be compared.

Parameters:
obj the non-null object to compare against.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
a negative integer, zero, or a positive integer as this name is less than, equal to, or greater than the given name

virtual bool javax::naming::Name::endsWith const ::javax::naming::Name n,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Determines whether this name ends with a specified suffix.

A name n is a suffix if it is equal to getSuffix(size()-n.size()).

Parameters:
n the name to check
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
true if n is a suffix of this name, false otherwise

virtual ::java::lang::String javax::naming::Name::get jint  posn,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Retrieves a component of this name.

Parameters:
posn the 0-based index of the component to retrieve. Must be in the range [0,size()).
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the component at index posn

virtual ::java::util::Enumeration javax::naming::Name::getAll ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Retrieves the components of this name as an enumeration of strings.

The effect on the enumeration of updates to this name is undefined. If the name has zero components, an empty (non-null) enumeration is returned.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
an enumeration of the components of this name, each a string

virtual ::javax::naming::Name javax::naming::Name::getPrefix jint  posn,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Creates a name whose components consist of a prefix of the components of this name.

Subsequent changes to this name will not affect the name that is returned and vice versa.

Parameters:
posn the 0-based index of the component at which to stop. Must be in the range [0,size()].
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
a name consisting of the components at indexes in the range [0,posn).

virtual ::javax::naming::Name javax::naming::Name::getSuffix jint  posn,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Creates a name whose components consist of a suffix of the components in this name.

Subsequent changes to this name do not affect the name that is returned and vice versa.

Parameters:
posn the 0-based index of the component at which to start. Must be in the range [0,size()].
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
a name consisting of the components at indexes in the range [posn,size()). If posn is equal to size(), an empty name is returned.

virtual bool javax::naming::Name::isEmpty ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Determines whether this name is empty.

An empty name is one with zero components.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
true if this name is empty, false otherwise

virtual ::java::lang::Object javax::naming::Name::remove jint  posn,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Removes a component from this name.

The component of this name at the specified position is removed. Components with indexes greater than this position are shifted down (toward index 0) by one.

Parameters:
posn the index of the component to remove. Must be in the range [0,size()).
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the component removed (a String)

virtual jint javax::naming::Name::size ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Returns the number of components in this name.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the number of components in this name

virtual bool javax::naming::Name::startsWith const ::javax::naming::Name n,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Determines whether this name starts with a specified prefix.

A name n is a prefix if it is equal to getPrefix(n.size()).

Parameters:
n the name to check
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
true if n is a prefix of this name, false otherwise


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:20:09 2006 for JMS Courier for C++ by  doxygen 1.4.1