java.lang.Object
org.apache.wicket.MetaDataKey<T>
- Type Parameters:
T
- The type of the object which is stored
- All Implemented Interfaces:
Serializable
,IClusterable
A key to a piece of metadata associated with a
Component
, Session
or
Application
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. 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 final MetaDataKey<Role> ROLE = new MetaDataKey<Role>() { };
- Author:
- Jonathan Locke
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
get
(MetaDataEntry<?>[] metaData) int
hashCode()
MetaDataEntry<?>[]
set
(MetaDataEntry<?>[] metaData, Object object) toString()
-
Constructor Details
-
MetaDataKey
public MetaDataKey()Constructor.
-
-
Method Details
-
hashCode
-
equals
-
get
- Parameters:
metaData
- Array of metadata to search- Returns:
- The entry value
-
set
- Parameters:
metaData
- The array of metadataobject
- The object to set, null to remove- Returns:
- Any new metadata array (if it was reallocated)
-
toString
-