jodd.petite.resolver
Class CtorResolver

java.lang.Object
  extended by jodd.petite.resolver.CtorResolver

public class CtorResolver
extends Object

Resolver for constructor injection points.


Field Summary
protected  Map<Class,CtorInjectionPoint> ctors
           
protected  InjectionPointFactory injectionPointFactory
           
 
Constructor Summary
CtorResolver(InjectionPointFactory injectionPointFactory)
           
 
Method Summary
 void remove(Class type)
           
 CtorInjectionPoint resolve(Class type)
          Resolves constructor injection point from type.
protected  CtorInjectionPoint resolve(Class type, boolean useAnnotation)
           
 CtorInjectionPoint resolveDefault(Class type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctors

protected final Map<Class,CtorInjectionPoint> ctors

injectionPointFactory

protected final InjectionPointFactory injectionPointFactory
Constructor Detail

CtorResolver

public CtorResolver(InjectionPointFactory injectionPointFactory)
Method Detail

resolve

public CtorInjectionPoint resolve(Class type)
Resolves constructor injection point from type. Looks for single annotated constructor. If no annotated constructors found, the total number of constructors will be checked. If there is only one constructor, that one will be used as injection point. If more constructors exist, the default one will be used as injection point. Otherwise, exception is thrown.


resolveDefault

public CtorInjectionPoint resolveDefault(Class type)

resolve

protected CtorInjectionPoint resolve(Class type,
                                     boolean useAnnotation)

remove

public void remove(Class type)