T
- The type of the object which is storedpublic abstract class DataKey<T> extends Object
Node
at runtime.
The key contains type information that can be used to check the
type of any user data value for the key when the value is set. DataKey is abstract in order to
force the creation of a subtype. That subtype is used to test for identity when looking for the
user data because actual object identity would suffer from problems under serialization.
So, the correct way to declare a DataKey is like this:
public static final DataKey<Role> ROLE = new DataKey<Role>() { };
This code was taken from the Wicket project.
Node.getData(DataKey)
Constructor and Description |
---|
DataKey() |
Copyright © 2007–2022. All rights reserved.