You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2008/06/17 11:44:34 UTC
svn commit: r668590 -
/mina/trunk/core/src/main/java/org/apache/mina/common/AttributeKey.java
Author: elecharny
Date: Tue Jun 17 02:44:33 2008
New Revision: 668590
URL: http://svn.apache.org/viewvc?rev=668590&view=rev
Log:
Adding Javadoc
Modified:
mina/trunk/core/src/main/java/org/apache/mina/common/AttributeKey.java
Modified: mina/trunk/core/src/main/java/org/apache/mina/common/AttributeKey.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/common/AttributeKey.java?rev=668590&r1=668589&r2=668590&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/common/AttributeKey.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/common/AttributeKey.java Tue Jun 17 02:44:33 2008
@@ -30,18 +30,25 @@
* @version $Rev$, $Date$
*/
public final class AttributeKey implements Serializable {
+ /** The serial version UID */
private static final long serialVersionUID = -583377473376683096L;
+ /** The attribute's name */
private final String name;
/**
- * Creates a new instance.
+ * Creates a new instance. It's built from :
+ * - the class' name
+ * - the attribute's name
+ * - this attribute hashCode
*/
public AttributeKey(Class<?> source, String name) {
- this.name = source.getName() + '.' + String.valueOf(name) + '@' +
- Integer.toHexString(System.identityHashCode(this));
+ this.name = source.getName() + '.' + name + '@' + Integer.toHexString(this.hashCode());
}
+ /**
+ * The String representation of tis objection is its constructed name.
+ */
@Override
public String toString() {
return name;