gh-pages / com.nextfaze.devfun.function / SimpleFunctionItem
SimpleFunctionItem
open class SimpleFunctionItem : FunctionItem (source)
Convenience class for FunctionItem to extend from, providing standard equals and hashCode implementations.
If overriding equals/hashCode, do not to include invoke in the implementations as it is usually a non-comparable anonymous instance.
See Also
Constructors
| Name | Summary |
|---|---|
| <init> | SimpleFunctionItem(function: FunctionDefinition, category: CategoryDefinition)Convenience class for FunctionItem to extend from, providing standard equals and hashCode implementations. |
Properties
| Name | Summary |
|---|---|
| category | open val category: CategoryDefinitionThe resolved category definition. |
| function | open val function: FunctionDefinitionThe original definition this item was derived from. |
Inherited Properties
| Name | Summary |
|---|---|
| args | open val args: FunctionArgsCustom arguments for the invoke invocation. Otherwise arguments will be requested from an InstanceProvider. |
| group | open val group: CharSequence?A “grouping” for this item. |
| invoke | open val invoke: FunctionInvokeFunction to be invoked on click. |
| name | open val name: CharSequenceThe formatted display name. |
Functions
| Name | Summary |
|---|---|
| equals | open fun equals(other: Any?): Boolean |
| hashCode | open fun hashCode(): Int |
| toString | open fun toString(): String |
Extension Properties
| Name | Summary |
|---|---|
| receiverClass | val FunctionItem.receiverClass: KClass<*>Get the receiver class for this function item. |
| receiverClassForInvocation | val FunctionItem.receiverClassForInvocation: KClass<*>?Get the receiver class for this function item if you intend to invoke it. That is, it will return null if the type isn’t needed. |
Extension Functions
| Name | Summary |
|---|---|
| call | fun FunctionItem.call(invoker: Invoker = devFun.get()): InvokeResult?Convenience function for invoking a FunctionItem using the current devFun instance. |
| parameterInstances | fun FunctionItem.parameterInstances(instanceProvider: InstanceProvider = devFun.instanceProviders): List<Any?>Get the parameter instances for this function item for invocation. |
| receiverInstance | fun FunctionItem.receiverInstance(instanceProvider: InstanceProvider = devFun.instanceProviders): Any?Get the receiver instance for this function item to be used for invocation. |