Class ConstructorUtils

java.lang.Object
com.querydsl.core.util.ConstructorUtils

public final class ConstructorUtils extends Object
ConstructorUtils provides constructor resolving functionality
Author:
Shredder121
  • Method Details

    • getConstructor

      public static <C> Constructor<C> getConstructor(Class<C> type, Class<?>[] givenTypes) throws NoSuchMethodException
      Returns the constructor where the formal parameter list matches the givenTypes argument. It is advisable to first call getConstructorParameters(java.lang.Class, java.lang.Class[]) to get the parameters.
      Parameters:
      type - type
      givenTypes - parameter types
      Returns:
      matching constructor
      Throws:
      NoSuchMethodException
    • getConstructorParameters

      public static Class<?>[] getConstructorParameters(Class<?> type, Class<?>[] givenTypes)
      Returns the parameters for the constructor that matches the given types.
      Parameters:
      type - type
      givenTypes - parameter types
      Returns:
      constructor parameters
    • getTransformers

      public static Iterable<Function<Object[],Object[]>> getTransformers(Constructor<?> constructor)
      Returns a fetch of transformers applicable to the given constructor.
      Parameters:
      constructor - constructor
      Returns:
      transformers