public class Functor extends Object
Constructor and Description |
---|
Functor(Class<?> _clazz,
String _methodName)
Create a functor from class and method name.
|
Functor(Class<?> _clazz,
String _methodName,
Class<?>[] _types)
Create a functor with the class, method name, and argument class types.
|
Functor(Object _invokee,
String _methodName)
Create a functor with the invokee and a method name.
|
Functor(Object _invokee,
String _methodName,
Class<?>[] _types)
Create a functor with the invokee, method name, and argument class types.
|
Functor(Object _invokee,
String _methodName,
Object[] _args)
Create a functor with an invokee, method name, and argument values.
|
Functor(String _methodName)
Create a functor with just the method name.
|
Functor(String _methodName,
Class<?>[] _types)
Create a functor with the method name and argument class types.
|
Functor(String _methodName,
Object[] _args)
Create a functor from method name and arguments.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkMethod(Object _invokee)
Deprecated.
** for use by Unit test code only **
|
boolean |
checkMethod(Object _invokee,
Class<?> c)
Deprecated.
** for use by Unit test code only **
|
Object |
invoke()
Invoke a Functor, which must have been created with either a class name or object.
|
Object |
invoke(Object p_invokee)
Invoke the method on a given object.
|
Object |
invoke(Object[] p_args)
Invoke the method with the provided parameters.
|
Object |
invoke(Object p_invokee,
Object[] p_args)
Invoke the method on the invokee with the provided parameters.
|
String |
toString() |
public Functor(Object _invokee, String _methodName)
_invokee
- object on which to invoke the method_methodName
- method namepublic Functor(Class<?> _clazz, String _methodName)
_clazz
- class to be used_methodName
- method namepublic Functor(Object _invokee, String _methodName, Class<?>[] _types)
_invokee
- object on which to invoke the method_methodName
- method name_types
- public Functor(Class<?> _clazz, String _methodName, Class<?>[] _types)
_clazz
- the class in which to find the method_methodName
- method name_types
- public Functor(String _methodName)
_methodName
- method namepublic Functor(String _methodName, Class<?>[] _types)
_methodName
- method name_types
- parameter typespublic Functor(Object _invokee, String _methodName, Object[] _args)
_invokee
- object on which to invoke the method_methodName
- method name_args
- arguments to be passed to the methodpublic Functor(String _methodName, Object[] _args)
_methodName
- method name_args
- public Object invoke()
public Object invoke(Object p_invokee)
p_invokee
- - provides the object to call; ignored if the class or object were provided to the constructorpublic Object invoke(Object[] p_args)
p_args
- parameters for the methodpublic Object invoke(Object p_invokee, Object[] p_args)
@Deprecated public boolean checkMethod(Object _invokee)
@Deprecated public boolean checkMethod(Object _invokee, Class<?> c)
Copyright © 1998-2016 Apache Software Foundation. All Rights Reserved.