|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.meta.TypeRegistry
public class TypeRegistry
Class for relating objects to types. This is slightly more involved than a simple map since some types can be broken down further to find better values.
Constructor Summary | |
---|---|
TypeRegistry()
|
|
TypeRegistry(TypeRegistry delegate)
|
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.Class classType)
Convenience method that will wrap the specified Class in a ClassPropertyType before searching. |
java.lang.Object |
get(MetaClass metaClassType)
Convenience method that will wrap the specified MetaClass in a MetaClassPropertyType before searching. |
java.lang.Object |
get(PropertyType type)
|
java.lang.Object |
get(PropertyType type,
boolean searchDefaults)
Returns the object associated with the specified type. |
java.lang.Object |
getDefault(PropertyType type)
|
java.lang.Object |
getDirectMatch(PropertyType type)
Returns the object associated with the specified type without doing any special type searches. |
java.lang.Object |
getValueForObject(java.lang.Object obj)
Convenience method that will lookup a value for the type of the specified object by either wrapping its meta-class in a MetaClassPropertyType or wrapping its class in a ClassPropertyType. |
void |
put(PropertyType type,
java.lang.Object value)
Maps the value to the specified type. |
void |
putDefault(java.lang.Class baseType,
java.lang.Object value)
Maps the value with a default base type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeRegistry()
public TypeRegistry(TypeRegistry delegate)
Method Detail |
---|
public void put(PropertyType type, java.lang.Object value)
public void putDefault(java.lang.Class baseType, java.lang.Object value)
public java.lang.Object get(PropertyType type, boolean searchDefaults)
public java.lang.Object get(PropertyType type)
public java.lang.Object get(java.lang.Class classType)
public java.lang.Object get(MetaClass metaClassType)
public java.lang.Object getValueForObject(java.lang.Object obj)
public java.lang.Object getDefault(PropertyType type)
public java.lang.Object getDirectMatch(PropertyType type)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |