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 Rule
asRule(Object rule)
Makes the rule object implement theRule
interface.Object
getTarget()
Object
invoke(Object proxy, Method method, Object[] args)
-
-
-
Method Detail
-
asRule
public static Rule asRule(Object rule)
Makes the rule object implement theRule
interface.- Parameters:
rule
- the annotated rule object.- Returns:
- a proxy that implements the
Rule
interface.
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
getTarget
public Object getTarget()
-
-