Class ReflectionUtils
java.lang.Object
org.antublue.test.engine.internal.util.ReflectionUtils
Class to implement ReflectionUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanacceptsArguments(Method method, Class<?>... parameterTypes) Method to determine if a Method accepts a specified set of parametersstatic booleanhasParameterCount(Method method, int parameterCount) Method to determine if a Method has a specified parameter countstatic booleanhasReturnType(Method method, Class<?> clazz) Method to determine if a Method returns a specific typestatic booleanisAbstract(Class<?> clazz) Method to determine if a Class is abstractstatic booleanisAbstract(Method method) Method to determine if a Method is abstractstatic booleanisProtected(Method method) Method to determine if a Method is protectedstatic booleanMethod to determine if a Method is publicstatic booleanMethod to determine if a Method is staticstatic ObjectnewInstance(Class<?> clazz) Method to create a new instance of a Class
-
Field Details
-
NO_CLASS_ARGS
-
NO_OBJECT_ARGS
-
-
Method Details
-
newInstance
Method to create a new instance of a Class- Parameters:
clazz- clazz- Returns:
- object object
- Throws:
Throwable- Throwable
-
isAbstract
Method to determine if a Class is abstract- Parameters:
clazz- clazz- Returns:
- true if the Class is abstract, otherwise false
-
isAbstract
Method to determine if a Method is abstract- Parameters:
method- method- Returns:
- true if the Method is abstract, otherwise false
-
isStatic
Method to determine if a Method is static- Parameters:
method- method- Returns:
- true if the Method is static, otherwise false
-
isPublic
Method to determine if a Method is public- Parameters:
method- method- Returns:
- true if the Method is public, otherwise false
-
isProtected
Method to determine if a Method is protected- Parameters:
method- method- Returns:
- true if the Method is protected, otherwise false
-
hasParameterCount
Method to determine if a Method has a specified parameter count- Parameters:
method- methodparameterCount- parameterCount- Returns:
- true if the Method has the specified parameter count, otherwise false
-
acceptsArguments
Method to determine if a Method accepts a specified set of parameters- Parameters:
method- methodparameterTypes- parameterTypes- Returns:
- true if the Method accepts the specified parameters, otherwise false
-
hasReturnType
Method to determine if a Method returns a specific type- Parameters:
method- methodclazz- clazz- Returns:
- true if the Method returns a specific type, otherwise false
-