gh-pages / com.nextfaze.devfun.invoke
Package com.nextfaze.devfun.invoke
Types
Name | Summary |
---|---|
CompositeParameterViewFactoryProvider | interface CompositeParameterViewFactoryProvider : ParameterViewFactoryProvider , Composite < ParameterViewFactoryProvider > A ParameterViewFactoryProvider that delegates to other providers. |
Invoker | interface Invoker Used to invoke a FunctionItem or UiFunction and automatically handles parameter injection and errors. |
Parameter | interface Parameter Effectively just a wrapper for KParameter to allow libraries to use it without declaring a dependency on the kotlin-reflect lib. |
ParameterViewFactoryProvider | interface ParameterViewFactoryProvider A factory that creates views based on parameter attributes to be used when invoking a function with non-injectable parameter types. |
UiButton | interface UiButton Describes a dialog button for use with UiFunction to be rendered via the DevFun Invocation UI. |
UiField | interface UiField<T : Any > : Parameter , WithInitialValue < T > Utility interface to easily generate an invoke UI/dialog. (experimental) |
UiFunction | interface UiFunction Describes a function to be executed via the DevFun Invocation UI. |
WithInitialValue | interface WithInitialValue<out T> Parameter objects that implement this will use the value provided by WithInitialValue.value rather than checking for an @From annotation. |
WithKParameter | interface WithKParameter Parameter objects that implement this will have their values backed by a native function parameter description. |
WithNullability | interface WithNullability Parameter objects that implement this will can be nullable. |
Type Aliases
Name | Summary |
---|---|
OnClick | typealias OnClick = () -> Unit |
SimpleInvoke | typealias SimpleInvoke = (args: List < Any ?>) -> Any ? |
Extensions for External Classes
Name | Summary |
---|---|
java.lang.reflect.Method |
Properties
Name | Summary |
---|---|
receiverClass | val FunctionDefinition .receiverClass: KClass <*> Get the receiver class for this function definition. val FunctionItem .receiverClass: KClass <*> Get the receiver class for this function item. |
receiverClassForInvocation | val FunctionDefinition .receiverClassForInvocation: KClass <*>? Get the receiver class for this function definition if you intend to invoke it. That is, it will return null if the type isn’t needed.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. |
Functions
Name | Summary |
---|---|
parameterInstances | fun FunctionDefinition .parameterInstances(instanceProvider: InstanceProvider = devFun.instanceProviders, args: FunctionArgs ): List < Any ?> Get the parameter instances for this function definition for invocation. fun FunctionItem .parameterInstances(instanceProvider: InstanceProvider = devFun.instanceProviders): List < Any ?> Get the parameter instances for this function item for invocation. |
receiverInstance | fun FunctionDefinition .receiverInstance(instanceProvider: InstanceProvider = devFun.instanceProviders): Any ? Get the receiver instance for this function definition to be used for invocation. fun FunctionItem .receiverInstance(instanceProvider: InstanceProvider = devFun.instanceProviders): Any ? Get the receiver instance for this function item to be used for invocation. |
uiButton | fun uiButton(text: CharSequence ? = null, textId: Int ? = null, onClick: OnClick ? = null, invoke: SimpleInvoke ? = null): UiButton Utility function to create a UiButton instance for use with UiFunction. |
uiField | fun <T : Any > uiField(name: CharSequence , initialValue: T , annotations: List < Annotation > = emptyList(), onSetValue: ( T ) -> Unit ): UiField < T > Utility function to create a UiField instance. (experimental) |
uiFunction | fun uiFunction(title: CharSequence , subtitle: CharSequence ? = null, signature: CharSequence ? = null, parameters: List < Parameter >, negativeButton: UiButton ? = null, neutralButton: UiButton ? = null, positiveButton: UiButton ? = null, invoke: SimpleInvoke ? = null): UiFunction Utility function to create a UiFunction instance. |