Class ToolHolder<T>

java.lang.Object
overit.geocall.cdi.holders.TypeHolder<T>
overit.geocall.cdi.holders.ToolHolder<T>
Type Parameters:
T - the type of the held value
All Implemented Interfaces:
Serializable, Holder<T>

@Component @Scope(scopeName="prototype", proxyMode=NO) @Tool(Tool.class) public class ToolHolder<T> extends TypeHolder<T>

Holder implementation resolve the Injection point annotated with Tool qualifier. This implementation retrieves the held value from the BeanService.

When injected, the type of the value depends on the type specified as Tool value

See Also:
  • Constructor Details

    • ToolHolder

      public ToolHolder(@NotNull @NotNull Class<T> type, @NotNull @NotNull BeanService service)
      Create a new instance of holder that will hold a value of a given type
      Parameters:
      type - the type of the held value
      service - the service from which extract the value