Class PreferredConstructorDiscovererFactory

java.lang.Object
in.co.akshitbansal.springwebquery.tupleconverter.PreferredConstructorDiscovererFactory

public class PreferredConstructorDiscovererFactory extends Object
Creates PreferredConstructorDiscoverer instances with optional shared constructor caching.
  • Constructor Details

    • PreferredConstructorDiscovererFactory

      public PreferredConstructorDiscovererFactory(boolean useCache)
      Creates a factory that produces cached or uncached discoverers.
      Parameters:
      useCache - whether discoverers should share a constructor cache
  • Method Details

    • newDiscoverer

      public <T> PreferredConstructorDiscoverer<T> newDiscoverer(@NonNull @NonNull Class<T> clazz)
      Creates a discoverer for the supplied DTO type.
      Type Parameters:
      T - target DTO type
      Parameters:
      clazz - DTO type whose constructors will be inspected
      Returns:
      cached or uncached discoverer depending on factory configuration