Class ConstructorInjection.SimpleArgumentResolver

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.Set<java.lang.Object> objects  
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleArgumentResolver​(java.util.Set<java.lang.Object> objects)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.Object objectThatIsAssignableFrom​(java.lang.Class<?> argType)  
      java.lang.Object[] resolveTypeInstances​(java.lang.Class<?>... argTypes)
      Try to resolve instances from types.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • objects

        final java.util.Set<java.lang.Object> objects
    • Constructor Detail

      • SimpleArgumentResolver

        public SimpleArgumentResolver​(java.util.Set<java.lang.Object> objects)
    • Method Detail

      • resolveTypeInstances

        public java.lang.Object[] resolveTypeInstances​(java.lang.Class<?>... argTypes)
        Description copied from interface: FieldInitializer.ConstructorArgumentResolver
        Try to resolve instances from types.

        Checks on the real argument type or on the correct argument number will happen during the field initialization FieldInitializer.initialize(). I.e the only responsibility of this method, is to provide instances if possible.

        Specified by:
        resolveTypeInstances in interface FieldInitializer.ConstructorArgumentResolver
        Parameters:
        argTypes - Constructor argument types, should not be null.
        Returns:
        The argument instances to be given to the constructor, should not be null.
      • objectThatIsAssignableFrom

        private java.lang.Object objectThatIsAssignableFrom​(java.lang.Class<?> argType)