|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.junit.runners.model.FrameworkMethod
public class FrameworkMethod
Represents a method on a test class to be invoked at the appropriate point in
test execution. These methods are usually marked with an annotation (such as
@Test
, @Before
, @After
, @BeforeClass
, {@code
Constructor Summary | |
---|---|
FrameworkMethod(java.lang.reflect.Method method)
Returns a new FrameworkMethod for method |
Method Summary | ||
---|---|---|
boolean |
equals(java.lang.Object obj)
|
|
|
getAnnotation(java.lang.Class<T> annotationType)
Returns the annotation of type annotationType on this method, if
one exists. |
|
java.lang.annotation.Annotation[] |
getAnnotations()
Returns the annotations on this method |
|
java.lang.reflect.Method |
getMethod()
Returns the underlying Java method |
|
java.lang.String |
getName()
Returns the method's name |
|
int |
hashCode()
|
|
java.lang.Object |
invokeExplosively(java.lang.Object target,
java.lang.Object... params)
Returns the result of invoking this method on target with
parameters params . |
|
boolean |
producesType(java.lang.Class<?> type)
Returns true iff this is a no-arg method that returns a value assignable to type |
|
void |
validatePublicVoid(boolean isStatic,
java.util.List<java.lang.Throwable> errors)
Adds to errors if this method:
is not public, or
returns something other than void, or
is static (given isStatic is false ), or
is not static (given isStatic is true ). |
|
void |
validatePublicVoidNoArg(boolean isStatic,
java.util.List<java.lang.Throwable> errors)
Adds to errors if this method:
is not public, or
takes parameters, or
returns something other than void, or
is static (given isStatic is false ), or
is not static (given isStatic is true ). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FrameworkMethod(java.lang.reflect.Method method)
FrameworkMethod
for method
Method Detail |
---|
public java.lang.reflect.Method getMethod()
public java.lang.Object invokeExplosively(java.lang.Object target, java.lang.Object... params) throws java.lang.Throwable
target
with
parameters params
. InvocationTargetException
s thrown are
unwrapped, and their causes rethrown.
java.lang.Throwable
public java.lang.String getName()
public void validatePublicVoidNoArg(boolean isStatic, java.util.List<java.lang.Throwable> errors)
errors
if this method:
isStatic is false
), or
isStatic is true
).
public void validatePublicVoid(boolean isStatic, java.util.List<java.lang.Throwable> errors)
errors
if this method:
isStatic is false
), or
isStatic is true
).
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean producesType(java.lang.Class<?> type)
type
public java.lang.annotation.Annotation[] getAnnotations()
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationType)
annotationType
on this method, if
one exists.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |