get

@MainThread
operator fun <T : Component> get(componentType: Class<T>): T?

Gets the component of a specific type.

Return

The component of the specified type, or null if the component does not exist.

Parameters

T

The generic Component type.

componentType

The type of component to get.


inline fun <T : Component> get(): T?

Gets the component of the specific type.

Return

The component of the specified type, or null if the component does not exist.

Parameters

T

The generic Component type.