|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AccessAdvisor
AccessAdvisor provides methods that are called when instrumented class is accessing some field. It is possible to change access behaviour by returning a different value to calling method(Jiapi runtime).
Minimum viable implementation ensuring correct functionality is
public Object set(Object target, String fieldName, Object value) { return value; } public Object get(Object target, String fieldName, Object value) { return value; }
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.Object target,
java.lang.String fieldName,
java.lang.Object value)
This method is called, when a field has been get. |
java.lang.Object |
set(java.lang.Object target,
java.lang.String fieldName,
java.lang.Object value)
This method is called, when a field is being set. |
Method Detail |
---|
java.lang.Object get(java.lang.Object target, java.lang.String fieldName, java.lang.Object value)
target
- target Object or target Class, if the field is
staticfieldName
- name of the fieldvalue
- value of the field. If the field holds a primitive type,
value is wrapped to corresponding primitive wrapper,
like java.lang.Integer
java.lang.Object set(java.lang.Object target, java.lang.String fieldName, java.lang.Object value)
target
- target Object or target Class, if the field is
staticfieldName
- name of the fieldvalue
- value to set. If the field holds a primitive type,
value is wrapped to corresponding primitive wrapper,
like java.lang.Integer
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |