|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.junit.runners.model.FrameworkMember<FrameworkMethod>
org.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,
@AfterClass, etc.)
| Constructor Summary | |
|---|---|
FrameworkMethod(Method method)
Returns a new FrameworkMethod for method |
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object obj)
|
|
|
getAnnotation(Class<T> annotationType)
Returns the annotation of type annotationType on this method, if
one exists. |
|
Annotation[] |
getAnnotations()
Returns the annotations on this method |
|
Class<?> |
getDeclaringClass()
Returns the class where the method is actually declared |
|
Method |
getMethod()
Returns the underlying Java method |
|
protected int |
getModifiers()
|
|
String |
getName()
Returns the method's name |
|
Class<?> |
getReturnType()
Returns the return type of the method |
|
Class<?> |
getType()
Returns the return type of the method |
|
int |
hashCode()
|
|
Object |
invokeExplosively(Object target,
Object... params)
Returns the result of invoking this method on target with
parameters params. |
|
boolean |
isShadowedBy(FrameworkMethod other)
|
|
boolean |
producesType(Type type)
Deprecated. This is used only by the Theories runner, and does not use all the generic type info that it ought to. It will be replaced with a forthcoming ParameterSignature#canAcceptResultOf(FrameworkMethod) once Theories moves to junit-contrib. |
|
String |
toString()
|
|
void |
validateNoTypeParametersOnArgs(List<Throwable> errors)
|
|
void |
validatePublicVoid(boolean isStatic,
List<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,
List<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 org.junit.runners.model.FrameworkMember |
|---|
isPublic, isStatic |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FrameworkMethod(Method method)
FrameworkMethod for method
| Method Detail |
|---|
public Method getMethod()
public Object invokeExplosively(Object target,
Object... params)
throws Throwable
target with
parameters params. InvocationTargetExceptions thrown are
unwrapped, and their causes rethrown.
Throwablepublic String getName()
getName in class FrameworkMember<FrameworkMethod>
public void validatePublicVoidNoArg(boolean isStatic,
List<Throwable> errors)
errors if this method:
isStatic is false), or
isStatic is true).
public void validatePublicVoid(boolean isStatic,
List<Throwable> errors)
errors if this method:
isStatic is false), or
isStatic is true).
protected int getModifiers()
getModifiers in class FrameworkMember<FrameworkMethod>public Class<?> getReturnType()
public Class<?> getType()
getType in class FrameworkMember<FrameworkMethod>public Class<?> getDeclaringClass()
getDeclaringClass in class FrameworkMember<FrameworkMethod>public void validateNoTypeParametersOnArgs(List<Throwable> errors)
public boolean isShadowedBy(FrameworkMethod other)
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object@Deprecated public boolean producesType(Type type)
type
public Annotation[] getAnnotations()
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
annotationType on this method, if
one exists.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||