Package org.jeasy.rules.core
Class RuleProxy
- java.lang.Object
-
- org.jeasy.rules.core.RuleProxy
-
- All Implemented Interfaces:
InvocationHandler
public class RuleProxy extends Object implements InvocationHandler
Main class to create rule proxies from annotated objects.- Author:
- Mahmoud Ben Hassine ([email protected])
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RuleasRule(Object rule)Makes the rule object implement theRuleinterface.ObjectgetTarget()Objectinvoke(Object proxy, Method method, Object[] args)
-
-
-
Method Detail
-
asRule
public static Rule asRule(Object rule)
Makes the rule object implement theRuleinterface.- Parameters:
rule- the annotated rule object.- Returns:
- a proxy that implements the
Ruleinterface.
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
getTarget
public Object getTarget()
-
-