ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able
Class AbleUserDefinedFunction

java.lang.Object
  |
  +--com.ibm.able.AbleMethodAdaptor
        |
        +--com.ibm.able.AbleUserDefinedFunction
All Implemented Interfaces:
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

Fields inherited from class com.ibm.able.AbleMethodAdaptor
myAdaptorName, myArgList, myArgListClassNames, myArity, myDclMethodSource, myMethod, myMethodName, myMethodSource, myValue
 
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.
 
Method Summary
static java.lang.String Copyright()
          Determine the copyright of this class.
 boolean equals(AbleUserDefinedFunction otherObject)
          Indicates if an AbleUserDefinedFunction is equivalent to this object by comparing their method values.
 
Methods inherited from class com.ibm.able.AbleMethodAdaptor
equalsNameArity, getMethodName, getName, getNameWithArity, getReturnType, getValue, invoke, setMethodSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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

Method Detail

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.

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003