Class MethodInfoCache

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
  • 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 bean
      clazz - the class of the bean
      method - the method
      context - the Spring application context
    • get

      public MethodInfo get(String beanName, String methodName)
      Get a method from the MethodCache.
      Parameters:
      beanName - the name of the bean
      methodName - the name of the method
      Returns:
      the found methodInfo object, null if there is no method found in the cache
    • iterator

      Specified by:
      iterator in interface Iterable<Map.Entry<MethodInfoCache.Key,MethodInfo>>
    • clear

      public void clear()
    • populateMethodInfoCache

      public void populateMethodInfoCache(org.springframework.context.ApplicationContext context)