public interface Multicast
Modifier and Type | Method and Description |
---|---|
Object[] |
getTargetsInArray()
Access the targets of the proxy in an array.
|
<T> T[] |
getTargetsInArray(Class<T> type)
Access the targets of the proxy in a typed array.
|
<T> T |
multicastTargets(Class<T> type,
String method,
Object[] args)
Multicast a matching method call, that is not available with the types implemented by the proxy.
|
Object |
multicastTargets(Method method,
Object[] args)
Multicast a direct method call, that is not available with the types implemented by the proxy.
|
<T> T multicastTargets(Class<T> type, String method, Object[] args) throws NoSuchMethodException
Use this possibility to operate on objects, that can typically not be proxied e.g. if the class type of the target object is final like it is for a lot of basic classes of java.lang. The result of the call follow the normal rules for multicast invocations.
Note that the implementation of this function must search the best fitting method. It is much more efficient to call the overloaded version of this function with the appropriate method object.
type
- the type that has a method with the given name and matching argumentsmethod
- the method nameargs
- the arguments of the invocationNoSuchMethodException
- if the type has no matching methodSecurityException
- if the security manager prevents the method access by reflectionObject multicastTargets(Method method, Object[] args)
Use this possibility to operate on objects, that can typically not be proxied e.g. if the class type of the target object is final like it is for a lot of basic classes of java.lang. The result of the call follow the normal rules for multicast invocations.
method
- the method to callargs
- the arguments of the invocation<T> T[] getTargetsInArray(Class<T> type)
type
- the type of an array elementObject[] getTargetsInArray()
Copyright © 2005–2019 Codehaus. All rights reserved.