Interface Instances

All Superinterfaces:
AutoCloseable

public interface Instances extends AutoCloseable
A factory for Suppliers of contextual instances.
Author:
Laird Nelson
See Also:
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    default void
     
    boolean
    Returns true if and only if it is possible for a client proxy to be created for contextual instances described by the supplied Id.
    <I> Supplier<? extends I>
    supplier(Bean<I> bean, Creation<I> creation)
    Returns a Supplier of contextual instances appropriate for the given Creation.
  • Method Details Link icon

    • close Link icon

      default void close()
      Specified by:
      close in interface AutoCloseable
    • proxiable Link icon

      boolean proxiable(Id id)
      Returns true if and only if it is possible for a client proxy to be created for contextual instances described by the supplied Id.
      Parameters:
      id - an Id; must not be null
      Returns:
      true if and only if it is possible for a client proxy to be created for contextual instances described by the supplied Id; false otherwise
      Throws:
      NullPointerException - if id is null
    • supplier Link icon

      <I> Supplier<? extends I> supplier(Bean<I> bean, Creation<I> creation)
      Returns a Supplier of contextual instances appropriate for the given Creation.
      Type Parameters:
      I - the type of the contextual instance being requested
      Parameters:
      bean - the Bean whose Factory will create any contextual instances; must not be null
      creation - a Creation; may be null
      Returns:
      a non-null Supplier of contextual instances of the appropriate type