java.lang.Object
ch.ralscha.extdirectspring.util.MethodInfoCache
- All Implemented Interfaces:
Iterable<Map.Entry<MethodInfoCache.Key,MethodInfo>>
@Service
public class MethodInfoCache
extends Object
implements Iterable<Map.Entry<MethodInfoCache.Key,MethodInfo>>
A simple cache for methods with key beanName/methodName
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Get a method from the MethodCache.booleanisEmpty()Is the cache empty?iterator()voidpopulateMethodInfoCache(org.springframework.context.ApplicationContext context) voidput(String beanName, Class<?> clazz, Method method, org.springframework.context.ApplicationContext context) Put a method into the MethodCache.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MethodInfoCache
public MethodInfoCache()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Is the cache empty? -
put
public void put(String beanName, Class<?> clazz, Method method, org.springframework.context.ApplicationContext context) Put a method into the MethodCache.- Parameters:
beanName- the name of the beanclazz- the class of the beanmethod- the methodcontext- the Spring application context
-
get
Get a method from the MethodCache.- Parameters:
beanName- the name of the beanmethodName- the name of the method- Returns:
- the found methodInfo object, null if there is no method found in the cache
-
iterator
- Specified by:
iteratorin interfaceIterable<Map.Entry<MethodInfoCache.Key,MethodInfo>>
-
clear
public void clear() -
populateMethodInfoCache
public void populateMethodInfoCache(org.springframework.context.ApplicationContext context)
-