metagloss 0.0.2

net.sf.metagloss.injection
Class InjectionManager

java.lang.Object
  extended by net.sf.metagloss.injection.InjectionManager

public class InjectionManager
extends java.lang.Object

The InjectionManager provides a retrieval and caching mechanism for annotated getters and setters.

The actual setter injection takes place in the appropriate Injector implementation; the InjectionManager has no bearing on the injection itself, except for the AnnotatedMethods it provides.

See Also:
CursorBind, XMLBind

Method Summary
static java.lang.String getCacheDescription()
          Gets the cache formatted formatted for readability.
static java.util.Set<AnnotatedMethod> getGetters(java.lang.Class<?> source, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
          Gets all getters for the requested class and annotation combination.
static java.util.Set<AnnotatedMethod> getSetters(java.lang.Class<?> source, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
          Gets all setters for the requested class and annotation combination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGetters

public static java.util.Set<AnnotatedMethod> getGetters(java.lang.Class<?> source,
                                                        java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Gets all getters for the requested class and annotation combination. The getters are cached internally after calling this method the first time.

Todo:
Cache methods matching boolean is.*()
Parameters:
source - Class from which to extract annotated setters.
annotation - Annotation class to match.
Returns:
All matching getters.

getSetters

public static java.util.Set<AnnotatedMethod> getSetters(java.lang.Class<?> source,
                                                        java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Gets all setters for the requested class and annotation combination. The setters are cached internally after calling this method the first time.

Parameters:
source - Class from which to extract annotated setters.
annotation - Annotation class to match.
Returns:
All matching setters.

getCacheDescription

public static java.lang.String getCacheDescription()
Gets the cache formatted formatted for readability. Useful for debugging.

Returns:
The getter/setter cache contents.