Class FactoryWithVisibility

java.lang.Object
org.jvnet.hk2.metadata.tests.FactoryWithVisibility
All Implemented Interfaces:
Factory<String>

@Service @PerLookup @Visibility(LOCAL) public class FactoryWithVisibility extends Object implements Factory<String>
  • Constructor Details

    • FactoryWithVisibility

      public FactoryWithVisibility()
  • Method Details

    • provide

      @Visibility(LOCAL) @PerLookup public String provide()
      Description copied from interface: Factory
      This method will create instances of the type of this factory. The provide method must be annotated with the desired scope and qualifiers.
      Specified by:
      provide in interface Factory<String>
      Returns:
      The produces object
    • dispose

      public void dispose(String instance)
      Description copied from interface: Factory
      This method will dispose of objects created with this scope. This method should not be annotated, as it is naturally paired with the provide method
      Specified by:
      dispose in interface Factory<String>
      Parameters:
      instance - The instance to dispose of