| org.mandarax.kernel.Constructor
All known Subclasses: org.mandarax.kernel.meta.JConstructor,
Method Summary | |
String | getName() Get the name of the object. | Class[] | getStructure() Get the type structure of the object, e.g. | Object | perform(Term[] parameter, Session session) Perform the function or predicate using an array of terms as
parameters.
This usually can only succeed if all terms are constant and
the function has a semantic. |
getName | String getName()(Code) | | Get the name of the object.
the name of the constructor |
getStructure | Class[] getStructure()(Code) | | Get the type structure of the object, e.g. the types of terms
that can be used with this constructor.
the structure of this constructor |
perform | Object perform(Term[] parameter, Session session) throws IllegalArgumentException, UnsupportedOperationException(Code) | | Perform the function or predicate using an array of terms as
parameters.
This usually can only succeed if all terms are constant and
the function has a semantic. E.g. if the function is (a wrapper around)
a java method, perform means invoking the method with the objects
wrapped by the constant terms as parameters.
The interface has been changed in 3.2 and takes now a session parameter.
This is to support functionality such as concurrent simulations. The session
object provides a context in which the operation is executed. The main
purpose of the session is to identify this context. Most applications
will not need this and can ignore this parameter.
the result of the perform operation Parameters: parameter - an array of terms Parameters: session - a session object throws: java.lang.UnsupportedOperationException - thrown if this constructor does not have a sematics and this operation cannot be supported throws: java.lang.IllegalArgumentException - |
|
|