|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jagg.MethodCache
public class MethodCache
Created as a wrapper around a HashMap
that maps property names
to Methods
.
Method Summary | |
---|---|
static MethodCache |
getMethodCache()
Returns the singleton MethodCache . |
MethodCall |
getMethodCallFromProperty(java.lang.Object value,
java.lang.String property)
Gets a specific MethodCall from the cache, or creates it by
finding the Method using reflection if it does not exist. |
java.lang.Object |
getValueFromProperty(java.lang.Object value,
java.lang.String property)
Gets a specific Method from the cache, or finds it using
reflection if it does not exist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static MethodCache getMethodCache()
MethodCache
.
MethodCache
.public java.lang.Object getValueFromProperty(java.lang.Object value, java.lang.String property) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
Method
from the cache, or finds it using
reflection if it does not exist. Invokes the Method
and
returns the value.
value
- The object on which to lookup a property value.property
- The property or method name plus signature to lookup.
java.lang.NoSuchMethodException
- If a suitable Method
couldn't
be found.
java.lang.IllegalAccessException
- If the Method
is inaccessible
(private, etc.)
java.lang.reflect.InvocationTargetException
- If the Method
throws an
Exception
during execution.public MethodCall getMethodCallFromProperty(java.lang.Object value, java.lang.String property) throws java.lang.NoSuchMethodException
MethodCall
from the cache, or creates it by
finding the Method
using reflection if it does not exist.
value
- The object on which to lookup a property value.property
- The property or method name plus signature to lookup.
MethodCall
.
java.lang.NoSuchMethodException
- If a suitable Method
couldn't
be found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |