com.ibm.able
Class AbleUserDefinedFunction
java.lang.Object
com.ibm.able.AbleMethodAdaptor
com.ibm.able.AbleUserDefinedFunction
- All Implemented Interfaces:
- AbleClearable, java.io.Serializable
- public class AbleUserDefinedFunction
- extends AbleMethodAdaptor
- implements java.io.Serializable
An AbleUserDefinedFunction is a named, encapsulated method that can be
used by an Agent or called from within inferencing or scripting
rules. The encapsulated method can be in any arbitrary Java
Object, and the name given to this encapsulated method can be
anything chosen by the user.
- See Also:
- Serialized Form
|
Constructor Summary |
AbleUserDefinedFunction(java.lang.String theUserDefinedFunctionName,
java.lang.Object theMethodSource,
java.lang.reflect.Method theMethod)
Construct a new AbleUserDefinedFunction with the specified
name. |
AbleUserDefinedFunction(java.lang.String theUserDefinedFunctionName,
java.lang.Object theMethodSource,
java.lang.String theMethodName,
java.lang.Class[] theMethodArgs)
Construct a new AbleUserDefinedFunction with the specified
name. |
| Methods inherited from class com.ibm.able.AbleMethodAdaptor |
clear, clear, equalsNameArity, getMethodName, getName, getNameWithArity, getReturnType, getValue, invoke, setMethodSource, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
AbleUserDefinedFunction
public AbleUserDefinedFunction(java.lang.String theUserDefinedFunctionName,
java.lang.Object theMethodSource,
java.lang.String theMethodName,
java.lang.Class[] theMethodArgs)
throws java.lang.NoSuchMethodException
- Construct a new AbleUserDefinedFunction with the specified
name. The given name is used to refer to a specific method in a
specific object, using the specified arguments.
- Parameters:
theUserDefinedFunctionName - The name of the user-defined function; it is this
name that can be referenced by agents and from within
rules.
theMethodSource - The Object that contains the method named below; it is
this object on which the method will be invoked.
theMethodName - The name of the method to invoke on the object given
above.
theMethodArgs - A list of Class objects that represent the types of
arguments required by the named method.
- Throws:
java.lang.NoSuchMethodException - If the method or method signature is not defined in
the source object.
AbleUserDefinedFunction
public AbleUserDefinedFunction(java.lang.String theUserDefinedFunctionName,
java.lang.Object theMethodSource,
java.lang.reflect.Method theMethod)
- Construct a new AbleUserDefinedFunction with the specified
name. The given name is used to refer to a specific method in a
specific object. The method may or may not take arguments; this is
determined by examining the given method object.
- Parameters:
theUserDefinedFunctionName - the name of the user-defined function; it is this
name that can be referenced by agents and from within
rules.
theMethodSource - the Object that contains the method given below; it is
this object on which the method will be invoked.
theMethod - the method to invoke
equals
public boolean equals(AbleUserDefinedFunction otherObject)
- Indicates if an AbleUserDefinedFunction is equivalent to this object
by comparing their method values.
- Returns:
true if the AbleUserDefinedFunction objects both have the same method; false otherwise.
hashCode
public int hashCode()
(C) Copyright IBM Corporation 1999, 2005