# ComposableMethod

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/reflect/ComposableMethod.jvmAndAndroid.kt+class:androidx.compose.runtime.reflect.ComposableMethod) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.3.0)


```
class ComposableMethod
```

<br />

*** ** * ** ***

Represents the @Composable method.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/java/lang/reflect/Method.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#asMethod()()` Returns the backing `https://developer.android.com/reference/java/lang/reflect/Method.html`. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#hashCode()()` |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#invoke(androidx.compose.runtime.Composer,kotlin.Any,kotlin.Array)(composer: https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composer, instance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, vararg args: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Calls the Composable method on the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#invoke(androidx.compose.runtime.Composer,kotlin.Any,kotlin.Array)`. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#parameterCount()` Returns the count of method parameters excluding the utility Compose-specific parameters. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/Class.html<*>>` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#parameterTypes()` Returns method parameters types excluding the utility Compose-specific parameters. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/reflect/Parameter.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#parameters()` Returns method parameters excluding the utility Compose-specific parameters. |

## Public functions

### asMethod

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.3.0)

```
fun asMethod(): Method
```

Returns the backing `https://developer.android.com/reference/java/lang/reflect/Method.html`.

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### invoke

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.3.0)

```
operator fun invoke(composer: Composer, instance: Any?, vararg args: Any?): Any?
```

Calls the Composable method on the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/reflect/ComposableMethod#invoke(androidx.compose.runtime.Composer,kotlin.Any,kotlin.Array)`. If the method accepts default values, this function will call it with the correct options set.

## Public properties

### parameterCount

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.3.0)

```
val parameterCount: Int
```

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

### parameterTypes

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.4.0)

```
val parameterTypes: Array<Class<*>>
```

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

### parameters

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.3.0)

```
val parameters: Array<Parameter>
```

Returns method parameters excluding the utility Compose-specific parameters.