org.apache.wicket
Class MetaDataKey

java.lang.Object
  extended by org.apache.wicket.MetaDataKey
All Implemented Interfaces:
java.io.Serializable, IClusterable

public abstract class MetaDataKey
extends java.lang.Object
implements IClusterable

A key to a piece of metadata associated with a Component at runtime. The key contains type information that can be used to check the type of any metadata value for the key when the value is set on the given Component. MetaDataKey is abstract in order to force the creation of a subtype. That subtype is used to test for identity when looking for the metadata because actual object identity would suffer from problems under serialization. So, the correct way to declare a MetaDataKey is like this: public static MetaDataKey ROLE = new MetaDataKey(Role.class) { }

Author:
Jonathan Locke
See Also:
Serialized Form

Constructor Summary
MetaDataKey(java.lang.Class type)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaDataKey

public MetaDataKey(java.lang.Class type)
Constructor.

Parameters:
type - The type of value stored under this key
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2004-2009 Apache Software Foundation. All Rights Reserved.