Class PostDecorator<T>

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler

    public class PostDecorator<T>
    extends DecoratorInvocationHandler<T>
    A proxy for post-decorating a field
    Author:
    Ivan Hristov
    • Constructor Detail

      • PostDecorator

        public PostDecorator​(T target,
                             T decorator)
    • Method Detail

      • invokeFirst

        protected java.lang.Object invokeFirst​(java.lang.reflect.Method method,
                                               java.lang.Object[] args)
                                        throws java.lang.IllegalArgumentException,
                                               java.lang.IllegalAccessException,
                                               java.lang.reflect.InvocationTargetException
        Specified by:
        invokeFirst in class DecoratorInvocationHandler<T>
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • invokeSecond

        protected java.lang.Object invokeSecond​(java.lang.reflect.Method method,
                                                java.lang.Object[] args)
                                         throws java.lang.IllegalArgumentException,
                                                java.lang.IllegalAccessException,
                                                java.lang.reflect.InvocationTargetException
        Specified by:
        invokeSecond in class DecoratorInvocationHandler<T>
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getResult

        protected java.lang.Object getResult​(java.lang.Object firstResult,
                                             java.lang.Object secondResult)
        Specified by:
        getResult in class DecoratorInvocationHandler<T>