|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mycila.testing.core.introspect.Introspector
public final class Introspector
Handles a test instance
| Constructor Summary | |
|---|---|
Introspector(Object instance)
|
|
| Method Summary | |
|---|---|
Object |
get(Field field)
Get a field's value |
boolean |
hasAnnotation(Class<? extends Annotation> annot)
|
Object |
instance()
|
Object |
invoke(Method method,
Object... args)
Invoke a method on this test instance |
List<Field> |
selectFields(Filter<Field> filter)
Select some fields. |
List<Method> |
selectMethods(Filter<Method> filter)
Select some methods. |
void |
set(Field field,
Object value)
Set a field value |
Class<?> |
testClass()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Introspector(Object instance)
| Method Detail |
|---|
public Object instance()
public Class<?> testClass()
public List<Field> selectFields(Filter<Field> filter)
Filters class to create and compose filters
filter - Filter to use for selection
public List<Method> selectMethods(Filter<Method> filter)
Filters class to create and compose filters
filter - Filter to use for selection
public Object invoke(Method method,
Object... args)
method - Method to be invokedargs - Method argument
public Object get(Field field)
field - The field
public void set(Field field,
Object value)
field - The fieldvalue - The new field valuepublic boolean hasAnnotation(Class<? extends Annotation> annot)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||