Class ResourceSupplier

java.lang.Object
org.apache.juneau.rest.ResourceSupplier
All Implemented Interfaces:
Supplier<Object>

public class ResourceSupplier extends Object implements Supplier<Object>
A supplier of a REST resource bean.

Pretty much just a normal supplier, but wrapped in a concrete class so that it can be retrieved by class name.

  • Constructor Details

    • ResourceSupplier

      public ResourceSupplier(Class<?> resourceClass, Supplier<?> supplier)
      Constructor.
      Parameters:
      resourceClass - The resource class.
      May or may not be the same as the object returned by the supplier (e.g. supplier returns a proxy).
      supplier - The supplier of the bean.
  • Method Details

    • getResourceClass

      public Class<?> getResourceClass()
      Returns the resource class.

      May or may not be the same as the object returned by the supplier (e.g. supplier returns a proxy).

      Returns:
      The resource class.
    • get

      public Object get()
      Specified by:
      get in interface Supplier<Object>