|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockito.internal.util.reflection.BeanPropertySetter
public class BeanPropertySetter
This utility class will call the setter of the property to inject a new value.
| Constructor Summary | |
|---|---|
BeanPropertySetter(java.lang.Object target,
java.lang.reflect.Field propertyField)
New BeanPropertySetter that don't report failure |
|
BeanPropertySetter(java.lang.Object target,
java.lang.reflect.Field propertyField,
boolean reportNoSetterFound)
New BeanPropertySetter |
|
| Method Summary | |
|---|---|
boolean |
set(java.lang.Object value)
Set the value to the property represented by this BeanPropertySetter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanPropertySetter(java.lang.Object target,
java.lang.reflect.Field propertyField,
boolean reportNoSetterFound)
target - The target on which the setter must be invokedpropertyField - The field that should be accessed with the setterreportNoSetterFound - Allow the set method to raise an Exception if the setter cannot be found
public BeanPropertySetter(java.lang.Object target,
java.lang.reflect.Field propertyField)
target - The target on which the setter must be invokedpropertyField - The propertyField that must be accessed through a setter| Method Detail |
|---|
public boolean set(java.lang.Object value)
BeanPropertySetter
value - the new value to pass to the property setter
true if the value has been injected, false otherwise
java.lang.RuntimeException - Can be thrown if the setter threw an exception, if the setter is not accessible
or, if reportNoSetterFound and setter could not be found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||