Author: ehillenius Date: Thu Jun 7 19:28:15 2007 New Revision: 545371 URL: http://svn.apache.org/viewvc?view=rev&rev=545371 Log: tweaks
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataEntry.java incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataKey.java Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataEntry.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataEntry.java?view=diff&rev=545371&r1=545370&r2=545371 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataEntry.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataEntry.java Thu Jun 7 19:28:15 2007 @@ -23,10 +23,33 @@ * * @author Jonathan Locke */ -class MetaDataEntry implements IClusterable +final class MetaDataEntry implements IClusterable { private static final long serialVersionUID = 1L; - MetaDataKey key; + final MetaDataKey key; + Serializable object; + + /** + * Construct. + * + * @param key + * meta data key + * @param object + */ + public MetaDataEntry(MetaDataKey key, Serializable object) + { + this.key = key; + this.object = object; + } + + /** + * @see java.lang.Object#toString() + */ + public String toString() + { + return key + "=" + object.getClass().getName() + "@" + + Integer.toHexString(object.hashCode()); + } } Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataKey.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataKey.java?view=diff&rev=545371&r1=545370&r2=545371 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataKey.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MetaDataKey.java Thu Jun 7 19:28:15 2007 @@ -123,9 +123,7 @@ } if (!set && object != null) { - MetaDataEntry m = new MetaDataEntry(); - m.key = this; - m.object = object; + MetaDataEntry m = new MetaDataEntry(this, object); if (metaData == null) { metaData = new MetaDataEntry[1]; @@ -159,5 +157,13 @@ throw new IllegalArgumentException("MetaDataKey " + getClass() + " requires argument of " + type + ", not " + object.getClass()); } + } + + /** + * @see java.lang.Object#toString() + */ + public String toString() + { + return getClass() + "[type=" + type + "]"; } }