org.jboss.osgi.spi
Class Attachments.Key

java.lang.Object
  extended by org.jboss.osgi.spi.Attachments.Key
Enclosing interface:
Attachments

public static class Attachments.Key
extends Object

A key for attachements


Constructor Summary
Attachments.Key(String name, Class<?> clazz)
          Construct the key with optional class and name
 
Method Summary
 boolean equals(Object obj)
          Two keys are equal if their toString() is equal
 Class<?> getClassPart()
          Get the class part for this key
 String getNamePart()
          Get the name part for this key
 int hashCode()
          Two keys have the same hashCode if their toString() is equal
 String toString()
          Returns the String repesentation of this Key.
static Attachments.Key valueOf(String key)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attachments.Key

public Attachments.Key(String name,
                       Class<?> clazz)
Construct the key with optional class and name

Method Detail

valueOf

public static Attachments.Key valueOf(String key)

getClassPart

public Class<?> getClassPart()
Get the class part for this key

Returns:
maybe null

getNamePart

public String getNamePart()
Get the name part for this key

Returns:
maybe null

equals

public boolean equals(Object obj)
Two keys are equal if their toString() is equal

Overrides:
equals in class Object

hashCode

public int hashCode()
Two keys have the same hashCode if their toString() is equal

Overrides:
hashCode in class Object

toString

public String toString()
Returns the String repesentation of this Key.

 "[" + clazz + "," + name + "]"
 

Overrides:
toString in class Object


Copyright © 2010. All Rights Reserved.