{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ComposableMethod

public final class ComposableMethod


Represents the @Composable method.

Summary

Public methods

final @NonNull Method

Returns the backing Method.

boolean
equals(Object other)
final int

Returns the count of method parameters excluding the utility Compose-specific parameters.

final @NonNull Class[]

Returns method parameters types excluding the utility Compose-specific parameters.

final @NonNull Parameter[]

Returns method parameters excluding the utility Compose-specific parameters.

int
final Object
invoke(@NonNull Composer composer, Object instance, Object args)

Calls the Composable method on the given instance.

Public methods

asMethod

public final @NonNull Method asMethod()

Returns the backing Method.

equals

public boolean equals(Object other)

getParameterCount

public final int getParameterCount()

Returns the count of method parameters excluding the utility Compose-specific parameters.

getParameterTypes

public final @NonNull Class[] getParameterTypes()

Returns method parameters types excluding the utility Compose-specific parameters.

getParameters

public final @NonNull Parameter[] getParameters()

Returns method parameters excluding the utility Compose-specific parameters.

hashCode

public int hashCode()

invoke

public final Object invoke(@NonNull Composer composer, Object instance, Object args)

Calls the Composable method on the given instance. If the method accepts default values, this function will call it with the correct options set.