Class VariableManagedObjectSource<T>

    • Field Detail

      • VARIABLE_NAME_PREFIX

        public static final java.lang.String VARIABLE_NAME_PREFIX
        Prefix for variable name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • VariableManagedObjectSource

        public VariableManagedObjectSource()
        Default constructor.
      • VariableManagedObjectSource

        public VariableManagedObjectSource​(java.util.function.Consumer<Var<T>> decorator)
        Instantiate.
        Parameters:
        decorator - Decorator of new Var.
    • Method Detail

      • extractVariableType

        public static java.lang.String extractVariableType​(java.lang.reflect.Type variableGenericType)
        Extracts the type from the variable.
        Parameters:
        variableGenericType - Variable Type.
        Returns:
        Variable type.
      • var

        public static <T> Var<T> var​(java.lang.Object object)
                              throws java.lang.IllegalStateException
        Obtains Var from dependency object.
        Parameters:
        object - Dependency object.
        Returns:
        Var wrapper on dependency object.
        Throws:
        java.lang.IllegalStateException - If fails to convert.
      • out

        public static <T> Out<T> out​(java.lang.Object object)
        Obtains Out from dependency object.
        Parameters:
        object - Dependency object.
        Returns:
        Out wrapper on dependency object.
      • in

        public static <T> In<T> in​(java.lang.Object object)
        Obtains In from dependency object.
        Parameters:
        object - Dependency object.
        Returns:
        In wrapper on dependency object.
      • val

        public static <T> T val​(java.lang.Object object)
        Obtains the value from dependency object.
        Parameters:
        object - Dependency object.
        Returns:
        Value extracted from dependency object.
      • type

        public static java.lang.String type​(java.lang.String type)
        Obtains the variable type.
        Parameters:
        type - Raw type name.
        Returns:
        Variable type.
      • name

        public static java.lang.String name​(java.lang.String qualifier,
                                            java.lang.String type)
        Obtains the variable name.
        Parameters:
        qualifier - Qualifier for variable.
        type - Variable type.
        Returns:
        Name for the variable.