|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.calitha.reflect.PropertyCache
public class PropertyCache
The PropertyCache is used to store information about the field/properties in classes and cache them so that they can retrieved very fast at a later time.
Only fields that have both a setter and getter are stored.
The singleton pattern makes sure that only one cache exists for the application.
The PropertyCache is thread-safe to use.
XMLPersistent| Constructor Summary | |
|---|---|
PropertyCache()
|
|
| Method Summary | |
|---|---|
void |
addProperties(Class type)
Adds the fields/properties in a class to the cache. |
Map<String,Property> |
getProperties(Class type)
Gets a map with all the fields/properties in a class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyCache()
| Method Detail |
|---|
public Map<String,Property> getProperties(Class type)
The map has synchronized access.
type - class type
IllegalArgumentException - if an argument is nullpublic void addProperties(Class type)
Fields are identified by methods that start with 'get', 'set' or 'is'.
type - class type
IllegalArgumentException - if an argument is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||