Class JdbiConstructors


  • public class JdbiConstructors
    extends java.lang.Object
    Utilities for JdbiConstructor annotation.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JdbiConstructors()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.lang.reflect.Constructor<T> findConstructorFor​(java.lang.Class<T> type)
      Find an invokable constructor.
      (package private) static <T> InstanceFactory<T> findFactoryFor​(java.lang.Class<T> type)
      Find an invokable instance factory, such as a constructor or a static factory method.
      private static <T> java.lang.reflect.Constructor<T> findImplicitConstructorFor​(java.lang.Class<T> type)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JdbiConstructors

        private JdbiConstructors()
    • Method Detail

      • findFactoryFor

        static <T> InstanceFactory<T> findFactoryFor​(java.lang.Class<T> type)
        Find an invokable instance factory, such as a constructor or a static factory method. Prefer an JdbiConstructor annotated constructor or static factory method if one is present. Throws if multiple or zero candidates are found.
        Type Parameters:
        T - the type to inspect
        Parameters:
        type - the type to inspect
        Returns:
        the preferred constructor or static factory method
      • findConstructorFor

        public static <T> java.lang.reflect.Constructor<T> findConstructorFor​(java.lang.Class<T> type)
        Find an invokable constructor. Prefer an JdbiConstructor annotated one if present. Throws if multiple or zero candidates are found.
        Type Parameters:
        T - the type to inspect
        Parameters:
        type - the type to inspect
        Returns:
        the preferred constructor
      • findImplicitConstructorFor

        private static <T> java.lang.reflect.Constructor<T> findImplicitConstructorFor​(java.lang.Class<T> type)