org.apache.myfaces.extensions.validator.core.property
Class DefaultPropertyInformation

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.core.property.DefaultPropertyInformation
All Implemented Interfaces:
PropertyInformation

public class DefaultPropertyInformation
extends Object
implements PropertyInformation

Since:
1.x.1
Author:
Gerhard Petracek

Field Summary
protected  Logger logger
           
 
Constructor Summary
DefaultPropertyInformation()
           
 
Method Summary
 void addMetaDataEntry(MetaDataEntry metaDataEntry)
          Adds the given MetaDataEntry
 boolean containsInformation(String key)
          Verifies if we have information for the given key.
 boolean equals(Object o)
           
 Object getInformation(String key)
          Returns the information for the given key.
<T> T
getInformation(String key, Class<T> targetClass)
          In addition to PropertyInformation#getInformation(java.lang.String) it casts to the given type.
 MetaDataEntry[] getMetaDataEntries()
          Returns an immutable array which contains the MetaDataEntrys which were created for the property.
 int hashCode()
           
 void resetMetaDataEntries()
          removes all MetaDataEntrys.
 void setInformation(String key, Object value)
          Stores the given value and links it to the given key.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Logger logger
Constructor Detail

DefaultPropertyInformation

public DefaultPropertyInformation()
Method Detail

containsInformation

public boolean containsInformation(String key)
Description copied from interface: PropertyInformation
Verifies if we have information for the given key. Some predefined keys are defined in PropertyInformationKeys.

Specified by:
containsInformation in interface PropertyInformation
Parameters:
key - key of the information.
Returns:
true if the instance is aware of an information which is linked to the given key

getInformation

public Object getInformation(String key)
Description copied from interface: PropertyInformation
Returns the information for the given key.

Specified by:
getInformation in interface PropertyInformation
Parameters:
key - key for the requested information
Returns:
the object (or null) which is linked to the given key

getInformation

public <T> T getInformation(String key,
                            Class<T> targetClass)
Description copied from interface: PropertyInformation
In addition to PropertyInformation#getInformation(java.lang.String) it casts to the given type.

Specified by:
getInformation in interface PropertyInformation
Type Parameters:
T - Type declaration for generics.
Parameters:
key - key for the requested information
targetClass - target class type
Returns:
the object (or null) which is linked to the given key
See Also:
PropertyInformation.getInformation(java.lang.String)

setInformation

public void setInformation(String key,
                           Object value)
Description copied from interface: PropertyInformation
Stores the given value and links it to the given key.

Specified by:
setInformation in interface PropertyInformation
Parameters:
key - key of the information.
value - value as information for the key.

getMetaDataEntries

public MetaDataEntry[] getMetaDataEntries()
Description copied from interface: PropertyInformation
Returns an immutable array which contains the MetaDataEntrys which were created for the property.

Specified by:
getMetaDataEntries in interface PropertyInformation
Returns:
all MetaDataEntrys

addMetaDataEntry

public void addMetaDataEntry(MetaDataEntry metaDataEntry)
Description copied from interface: PropertyInformation
Adds the given MetaDataEntry

Specified by:
addMetaDataEntry in interface PropertyInformation
Parameters:
metaDataEntry - MetaDataEntry to store.

resetMetaDataEntries

public void resetMetaDataEntries()
Description copied from interface: PropertyInformation
removes all MetaDataEntrys.

Specified by:
resetMetaDataEntries in interface PropertyInformation

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.