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 ElementType
getElementType
(Executable executable) static String
getExecutableAsString
(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 Signature
getSignature
(Executable executable) static Signature
getSignature
(String name, Class<?>[] parameterTypes) static String
getSimpleName
(Executable executable) boolean
isResolvedToSameMethodInHierarchy
(Class<?> mainSubType, Method left, Method right) Checks if a pair of given methods (left
andright
) are resolved to the same method based on themainSubType
type.boolean
Checks, whethersubTypeMethod
overridessuperTypeMethod
.boolean
-
Constructor Details
-
ExecutableHelper
-
-
Method Details
-
overrides
-
overrides
Checks, whethersubTypeMethod
overridessuperTypeMethod
.- Parameters:
subTypeMethod
- The sub type method (cannot benull
).superTypeMethod
- The super type method (cannot benull
).- Returns:
- Returns
true
ifsubTypeMethod
overridessuperTypeMethod
,false
otherwise.
-
isResolvedToSameMethodInHierarchy
Checks if a pair of given methods (left
andright
) are resolved to the same method based on themainSubType
type.- 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:
true
if a pair of methods are equalleft == right
, or one of the methods override another one in the class hierarchy withmainSubType
at the bottom,false
otherwise.
-
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
-