Package | Description |
---|---|
student.testingsupport |
Modifier and Type | Method and Description |
---|---|
static ReflectionSupport.VisibilityConstraint |
ReflectionSupport.VisibilityConstraint.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReflectionSupport.VisibilityConstraint[] |
ReflectionSupport.VisibilityConstraint.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static Constructor<?> |
ReflectionSupport.getMatchingConstructor(Class<?> c,
ReflectionSupport.VisibilityConstraint visibility,
Class<?>... params)
Look up a constructor by parameter profile, finding the
constructor that will accept the given list of parameters (not
requiring an exact match on parameter types).
|
static Constructor<?> |
ReflectionSupport.getMatchingConstructor(Class<?> c,
ReflectionSupport.VisibilityConstraint visibility,
ReflectionSupport.ParameterSignature params)
Look up a constructor by parameter profile, finding the
constructor that will accept the given list of parameters (not
requiring an exact match on parameter types).
|
static Method |
ReflectionSupport.getMatchingMethod(Class<?> c,
ReflectionSupport.VisibilityConstraint visibility,
String name,
Class<?>... params)
Look up a method by name and parameter profile, finding the
method that will accept the given list of parameters (not requiring
an exact match on parameter types).
|
static Method |
ReflectionSupport.getMatchingMethod(Class<?> c,
ReflectionSupport.VisibilityConstraint visibility,
String name,
ReflectionSupport.ParameterSignature params)
Look up a method by name and parameter profile, finding the
method that will accept the given list of parameters (not requiring
an exact match on parameter types).
|
static Method |
ReflectionSupport.getMethod(Class<?> c,
ReflectionSupport.VisibilityConstraint visibility,
String name,
Class<?>... params)
Look up a method by name and parameter profile, turning any
errors into test case failures with appropriate hint messages.
|
static <T> T |
ReflectionSupport.invoke(Object receiver,
ReflectionSupport.VisibilityConstraint visibility,
Class<T> returnType,
String methodName,
Object... params)
Dynamically look up and invoke a method on a target object, with
appropriate hints if any failures happen along the way.
|
static void |
ReflectionSupport.invoke(Object receiver,
ReflectionSupport.VisibilityConstraint visibility,
String methodName,
Object... params)
Dynamically look up and invoke a method on a target object, with
appropriate hints if any failures happen along the way.
|
static <T> T |
ReflectionSupport.invokeEx(Object receiver,
ReflectionSupport.VisibilityConstraint visibility,
Class<T> returnType,
String methodName,
Object... params)
Just like
ReflectionSupport.invoke(Object, Class, String, Object...) , but unwraps
any InvocationTargetExceptions and throws the true cause. |
static void |
ReflectionSupport.invokeEx(Object receiver,
ReflectionSupport.VisibilityConstraint visibility,
String methodName,
Object... params)
Just like
ReflectionSupport.invoke(Object, String, Object...) , but unwraps
any InvocationTargetExceptions and throws the true cause. |