Class AnnotationProxyFactory.AnnotationInvocationHandler

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler
    Enclosing class:
    AnnotationProxyFactory

    private static class AnnotationProxyFactory.AnnotationInvocationHandler
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler
    Invocation handler implementing an invoke method that redirects every method call to the custom annotation method when possible; if not returns the reference annotation method default value
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.annotation.Annotation customAnnotation  
    • Constructor Summary

      Constructors 
      Constructor Description
      AnnotationInvocationHandler​(java.lang.annotation.Annotation customAnnotation)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.reflect.Method getMatchingMethodOnGivenAnnotation​(java.lang.reflect.Method method)  
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • customAnnotation

        private final java.lang.annotation.Annotation customAnnotation
    • Constructor Detail

      • AnnotationInvocationHandler

        public AnnotationInvocationHandler​(java.lang.annotation.Annotation customAnnotation)
    • Method Detail

      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable
      • getMatchingMethodOnGivenAnnotation

        private java.lang.reflect.Method getMatchingMethodOnGivenAnnotation​(java.lang.reflect.Method method)