Class RuleProxy

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

    public class RuleProxy
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler
    Main class to create rule proxies from annotated objects.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Rule asRule​(java.lang.Object rule)
      Makes the rule object implement the Rule interface.
      java.lang.Object getTarget()  
      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
    • Method Detail

      • asRule

        public static Rule asRule​(java.lang.Object rule)
        Makes the rule object implement the Rule interface.
        Parameters:
        rule - the annotated rule object.
        Returns:
        a proxy that implements the Rule interface.
      • getTarget

        public java.lang.Object getTarget()
      • 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