Package autumn.lang.internals
Class AbstractDefinedFunctor
java.lang.Object
autumn.lang.internals.AbstractFunctor
autumn.lang.internals.AbstractTypedFunctor
autumn.lang.internals.AbstractDefinedFunctor
- All Implemented Interfaces:
DefinedFunctor,Functor,TypedFunctor
- Direct Known Subclasses:
Action,Function0,Function1,Function2,Function3,Function4,Function5,Function6,Function7,Function8,Function9,Predicate,ProxyHandler
This class provides a partial implementation of the DefinedFunctor interface.
- Author:
- Mackenzie High
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidapply(ArgumentStack stack) This method performs an invocation of this function object.final TypedFunctorinner()This method retrieves the functor that is wrapped by this object.final StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface autumn.lang.DefinedFunctor
parameterTypes, returnType
-
Constructor Details
-
AbstractDefinedFunctor
Sole Constructor.- Parameters:
inner- is the inner() functor.
-
-
Method Details
-
inner
This method retrieves the functor that is wrapped by this object.- Specified by:
innerin interfaceDefinedFunctor- Returns:
- the inner functor.
-
apply
This method performs an invocation of this function object.Programmers should not call this method directly. Instead, for convenience, call this method indirectly via (F::apply List).
Calling Convention from top to bottom (n >= 0):
- argument[n]
- argument[.]
- argument[2]
- argument[1]
- argument[0]
The argument stack will be cleared and then the result will be pushed onto it. If the functor does not return a value, then the stack will remain empty.
- Specified by:
applyin interfaceDefinedFunctor- Specified by:
applyin interfaceFunctor- Parameters:
stack- is a stack containing the arguments being passed to this functor.- Throws:
Throwable- in order to propagate exceptions thrown by the functor.
-
toString
-