Package com.querydsl.core.util
Class ConstructorUtils
java.lang.Object
com.querydsl.core.util.ConstructorUtils
ConstructorUtils provides constructor resolving functionality
- Author:
- Shredder121
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> Constructor<C>getConstructor(Class<C> type, Class<?>[] givenTypes) Returns the constructor where the formal parameter list matches the givenTypes argument.static Class<?>[]getConstructorParameters(Class<?> type, Class<?>[] givenTypes) Returns the parameters for the constructor that matches the given types.getTransformers(Constructor<?> constructor) Returns a fetch of transformers applicable to the given constructor.
-
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 callgetConstructorParameters(java.lang.Class, java.lang.Class[])to get the parameters.- Parameters:
type- typegivenTypes- parameter types- Returns:
- matching constructor
- Throws:
NoSuchMethodException
-
getConstructorParameters
Returns the parameters for the constructor that matches the given types.- Parameters:
type- typegivenTypes- parameter types- Returns:
- constructor parameters
-
getTransformers
Returns a fetch of transformers applicable to the given constructor.- Parameters:
constructor- constructor- Returns:
- transformers
-