Package jodd.proxetta.advice
Class DelegateAdvice
- java.lang.Object
-
- jodd.proxetta.advice.DelegateAdvice
-
- All Implemented Interfaces:
ProxyAdvice
public class DelegateAdvice extends java.lang.Object implements ProxyAdvice
Delegates calls to target using reflection. Offers separation between between points where class is loaded and class is used.Allows usage of classes loaded by different class loader. For example, if you have an instance of class loaded by parent-last class loader, delegate allows to still call it using plain java. Under the hood, each method will actually invoke target method using reflection.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.Object
_target
Target object.
-
Constructor Summary
Constructors Constructor Description DelegateAdvice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
execute()
Looks up for method in target object and invokes it using reflection.
-
-
-
Method Detail
-
execute
public java.lang.Object execute() throws java.lang.Exception
Looks up for method in target object and invokes it using reflection.- Specified by:
execute
in interfaceProxyAdvice
- Throws:
java.lang.Exception
-
-