Class ExecutableHelper
java.lang.Object
org.hibernate.validator.internal.util.ExecutableHelper
Provides shared functionality dealing with executables.
- Author:
- Hardy Ferentschik, Gunnar Morling, Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementTypegetElementType(Executable executable) static StringgetExecutableAsString(String name, Class<?>... parameterTypes) Returns a string representation of an executable with the given name and parameter types in the form<name>(<parameterType 0> ... <parameterType n>), e.g.static SignaturegetSignature(Executable executable) static SignaturegetSignature(String name, Class<?>[] parameterTypes) static StringgetSimpleName(Executable executable) booleanisResolvedToSameMethodInHierarchy(Class<?> mainSubType, Method left, Method right) Checks if a pair of given methods (leftandright) are resolved to the same method based on themainSubTypetype.booleanChecks, whethersubTypeMethodoverridessuperTypeMethod.boolean
-
Constructor Details
-
ExecutableHelper
-
-
Method Details
-
overrides
-
overrides
Checks, whethersubTypeMethodoverridessuperTypeMethod.- Parameters:
subTypeMethod- The sub type method (cannot benull).superTypeMethod- The super type method (cannot benull).- Returns:
- Returns
trueifsubTypeMethodoverridessuperTypeMethod,falseotherwise.
-
isResolvedToSameMethodInHierarchy
Checks if a pair of given methods (leftandright) are resolved to the same method based on themainSubTypetype.- Parameters:
mainSubType- a type at the bottom of class hierarchy to be used to lookup the methods.left- one of the methods to checkright- another of the methods to check- Returns:
trueif a pair of methods are equalleft == right, or one of the methods override another one in the class hierarchy withmainSubTypeat the bottom,falseotherwise.
-
getSimpleName
-
getSignature
-
getSignature
-
getExecutableAsString
Returns a string representation of an executable with the given name and parameter types in the form<name>(<parameterType 0> ... <parameterType n>), e.g. for logging purposes.- Parameters:
name- the name of the executableparameterTypes- the types of the executable's parameters- Returns:
- A string representation of the given executable.
-
getElementType
-