WebLogic Integration


com.bea.wlai.common
Class QualifiedName

java.lang.Object
  |
  +--com.bea.wlai.common.QualifiedName

public class QualifiedName
extends java.lang.Object
implements java.io.Serializable

Represents a qualified name including a namespace and the object's name. For example, an object with name bar existing in a namespace with name foo would have a qualified name 'foo.bar'. This class is Serializable.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Constructor Summary
QualifiedName(INamespace namespace, java.lang.String name)
          Construct a new QualifiedName with the given namespace and object name.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare this object to the given object and determine if they are equal.
 java.util.Iterator getComponents()
          Get an Iterator over the components of this qualified name.
 java.lang.String getName()
          Return the object name portion of this QualifiedName.
 INamespace getNamespace()
          Return the namespace portion of this QualifiedName.
 int hashCode()
          Return a hash used to store QualifiedNames into hash tables, and retrieve them.
 void setName(java.lang.String name)
          Set the name portion of this QualifiedName.
 void setNamespace(INamespace namespace)
          Set the namespace portion of this QualifiedName.
 java.lang.String toString()
          Return a string representation of this QualifiedName in . format.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QualifiedName

public QualifiedName(INamespace namespace,
                     java.lang.String name)
              throws java.lang.IllegalArgumentException
Construct a new QualifiedName with the given namespace and object name.

Parameters:
namespace - The namespace portion of this QualifiedName, or null if there is to be no namespace.
name - The object name portion of this QualifiedName. Null is not allowed.
Throws:
java.lang.IllegalArgumentException - If the name parameter is null.
Method Detail

getNamespace

public INamespace getNamespace()
Return the namespace portion of this QualifiedName.

Returns:
The namespace portion of this QualifiedName, or null if none has been set.

setNamespace

public void setNamespace(INamespace namespace)
Set the namespace portion of this QualifiedName.

Parameters:
namespace - The new namespace, or null if there is to be no namespace.

getName

public java.lang.String getName()
Return the object name portion of this QualifiedName.

Returns:
The object name portion of this QualifiedName. This should never be null.

setName

public void setName(java.lang.String name)
             throws java.lang.IllegalArgumentException
Set the name portion of this QualifiedName.

Parameters:
The - new object name. Null is not allowed.
Throws:
java.lang.IllegalArgumentException - If the new name is null.

getComponents

public java.util.Iterator getComponents()
Get an Iterator over the components of this qualified name. Each component is returned as a QualifiedName, starting with the first component that is not the root namespace. For example, if a namespace with name foo existing in the root namespace, and foo contained an object named bar, the getComponents method would return an Iterator over two components. This first component is a QualifiedName with namespace equal to the root namespace and name equal 'foo'. The second component is a QualifiedName with namespace equal to foo and name equal 'bar'.

Returns:
An iterator over the components (QualifiedName) of this qualified name.

toString

public java.lang.String toString()
Return a string representation of this QualifiedName in . format.

Returns:
The string representation of this object.
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Compare this object to the given object and determine if they are equal. For QualifiedNames, this means that both the namespace and name must be equal.

Returns:
True if the name and namespace of the obj param equal this QualifiedName's name and namespace.
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return a hash used to store QualifiedNames into hash tables, and retrieve them.

Returns:
A hash value representing the toString() value for this object.
Overrides:
hashCode in class java.lang.Object

WebLogic Integration

WebLogic Integration (WLI)