org.apache.felix.ipojo
Interface FieldInterceptor

All Known Implementing Classes:
ArchitectureHandler, ConfigurationHandler, ControllerHandler, Dependency, DependencyHandler, LifecycleCallbackHandler, PrimitiveHandler, Property, ProvidedServiceHandler

public interface FieldInterceptor

Field interceptor. A class implementing this interface is able to be notified of field accesses. The listener need to be register on the instance manager.

Author:
Felix Project Team

Method Summary
 java.lang.Object onGet(java.lang.Object pojo, java.lang.String fieldName, java.lang.Object value)
          This method is called when a GETFIELD operation is detected.
 void onSet(java.lang.Object pojo, java.lang.String fieldName, java.lang.Object value)
          This method is called when a PUTFIELD operation is detected.
 

Method Detail

onSet

void onSet(java.lang.Object pojo,
           java.lang.String fieldName,
           java.lang.Object value)
This method is called when a PUTFIELD operation is detected.

Parameters:
pojo - : the pojo object setting the value
fieldName - : the field name
value - : the value passed to the field

onGet

java.lang.Object onGet(java.lang.Object pojo,
                       java.lang.String fieldName,
                       java.lang.Object value)
This method is called when a GETFIELD operation is detected.

Parameters:
pojo - : the pojo object getting the value
fieldName - : the field name
value - : the value passed to the field (by the previous call)
Returns:
: the managed value of the field