Class DependencyInjection


  • public class DependencyInjection
    extends Object
    DependencyInjection maintains a collection of injectable default objects, and is able to inject those objects into uninitialized properties of other configuration objects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addInjectable​(Object object)
      Registers the object as an object which can be injected later into uninitialized properties.
      static void injectDependencies​(Object object, java.util.List<String> initializedProperties)
      Initializes the properties that has not got a value explicitly and are annotated with @Inject annotation with default objects selected from the set of injectable objects.
      • Methods inherited from class java.lang.Object

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

      • DependencyInjection

        public DependencyInjection()
    • Method Detail

      • addInjectable

        public static void addInjectable​(Object object)
        Registers the object as an object which can be injected later into uninitialized properties.
        Parameters:
        object - The object which can be injected
      • injectDependencies

        public static void injectDependencies​(Object object,
                                              java.util.List<String> initializedProperties)
        Initializes the properties that has not got a value explicitly and are annotated with @Inject annotation with default objects selected from the set of injectable objects.
        Parameters:
        object - The object that may have uninitialized properties
        initializedProperties - The list of properties which were explicitly initialized.