Class ComponentFramework


  • public final class ComponentFramework
    extends java.lang.Object
    Component Framework - supplementary class in DEPENDENCY INJECTION example
    Allows the client to create a component, injects the necessary references before handing over the component to the client.
    Author:
    Karl Eilebrecht
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COMPONENT_1
      constant in this example to obtain component 1
      static java.lang.String COMPONENT_2
      constant in this example to obtain component 2
      static java.lang.String COMPONENT_3
      constant in this example to obtain component 3
      static java.lang.String COMPONENT_4
      constant in this example to obtain component 4
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Component createComponent​(java.lang.String componentIdentifier)
      Creates the requested component and injects necessary services
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createComponent

        public static Component createComponent​(java.lang.String componentIdentifier)
                                         throws java.lang.Exception
        Creates the requested component and injects necessary services
        Parameters:
        componentIdentifier - identifies component type
        Returns:
        created component
        Throws:
        java.lang.Exception - on any error