Introductor implementation for introducing JavaBeans style interfaces via {@link BeanIntroductorAdvisor}and {@link BeanIntroductorInterceptor}.
This introductor introduces additional interfaces into a target object, and creates a proxy object that behaves like the following:
- Every call to a getter/setter method declared into the introduced interface is delegated to the target object if this declares and implements a public method with equal signature, otherwise it is automatically implemented by the proxy.
- Every call to a non getter/setter method declared into the introduced interface throws an exception.
- Every call to a method not declared into the introduced interface is directly delegated to the target object
Moreover, it is possible to change the introductor behaviour by annotating the introduced interfaces with annotations contained in the
org.springmodules.xt.model.introductor.annotation package; it is possible to use the following annotations:
- {@link org.springmodules.xt.model.introductor.annotation.MapToTargetField}
- {@link org.springmodules.xt.model.introductor.annotation.OverrideTarget}
Restrictions: The only restriction is that introduced methods cannot return primitive values; so, you have to use wrapper objects instead when you need to return a primitive type.
This class is thread-safe.
@author Sergio Bossa