ComposableInferredTargetConstraints


An annotation generated by the Compose compiler plugin. Do not use explicitly.

The Compose compiler plugin generates this annotation to supplement ComposableInferredTarget annotations on functions that are themselves, or have lambda parameters that are, only compatible with a limited set of appliers.

This is intended to only be generated by the plugin and should not be used directly. Use ComposableTarget to explicitly indicate that a function is only compatible with a limited set of appliers instead.

For example, a function that has:

  1. a body and a single lambda parameter that expect the same applier, where that applier is only allowed to have the name "WComposable" or "XComposable"

  2. a return type that is a lambda whose body expects an applier that has the name "YComposable" or "ZComposable"

would have the following annotations added to it by the compiler plugin:

@ComposableInferredTarget(scheme = "[0[0]:[_]]")
@ComposableInferredTargetConstraints(
positional = "[_[_]:[{YComposable,ZComposable}]]"
indexed = "[{WComposable,XComposable}]"
)

The indices in the ComposableInferredTarget annotation work the same way as indices of ComposableOpenTarget. The body and lambda parameter of the function have the same index, 0, so the compiler encodes the set of appliers that they are compatible with at index 0 of indexed. The body of the return type does not have an index, so the compiler encodes the set of appliers that it is compatible with in positional.

If the indexed argument is empty, it means that there are no constraints on any indexed parts of the annotated function. If the positional argument is empty, it means that there are no constraints on any non-indexed parts of the annotated function.

Summary

Public constructors

Cmn

Public properties

String
Cmn
String
Cmn

Public constructors

ComposableInferredTargetConstraints

ComposableInferredTargetConstraints(positional: String, indexed: String)

Public properties

indexed

val indexedString

positional

val positionalString