TestComponent

Deprecated

A Component that wraps another component for testing purposes. This component has a lifecycle that doesn't override any methods except for isEquivalentTo().

Deprecated

Use ComponentAssert APIs instead. Because this isn't generated with codegen, it can have subtle issues in tests.

Properties

Link copied to clipboard
val Companion: ContentAllocator.Companion
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun acceptTriggerEvent(eventTrigger: EventTrigger<out Any>, eventState: Any, params: Array<Any>): Any
fun acceptTriggerEvent(eventTrigger: EventTrigger, eventState: Any, params: Array<Any>): Any
Link copied to clipboard
Link copied to clipboard
open fun createContent(context: Context): Any
abstract fun createContent(p: Context): Content
Link copied to clipboard
Link copied to clipboard
open fun createPoolableContent(context: Context): Any
open fun createPoolableContent(context: Context): Content
Link copied to clipboard
open fun createRecyclingPool(poolSize: Int): MountItemsPool.ItemPool
open fun createRecyclingPool(poolSizeOverride: Int): MountItemsPool.ItemPool
Link copied to clipboard
For internal use, only.
Link copied to clipboard
abstract fun dispatchOnEvent(eventHandler: EventHandler<out Any>, eventState: Any): Any
fun dispatchOnEvent(eventHandler: EventHandler, eventState: Any): Any
Link copied to clipboard
fun equals(@Nullable obj: Any): Boolean
Link copied to clipboard
Link copied to clipboard
open fun <T> getDebugAttribute(attributeKey: AttributeKey<T>): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
This indicates the type of the Object that will be returned by mount.
Link copied to clipboard
Link copied to clipboard
open fun getRenderType(): RenderUnit.RenderType
abstract fun getRenderType(): RenderUnit.RenderType
Link copied to clipboard
Should only be used by logging to provide more readable messages.
Link copied to clipboard
open fun <T> getTreePropFromParent(parentTreePropContainer: TreePropContainer, key: Class<T>): T
Link copied to clipboard
fun getTypeId(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun hashCode(): Int
Link copied to clipboard
open fun isEquivalentProps(@Nullable other: Component, shouldCompareCommonProps: Boolean): Boolean
Determine if this component has equivalent props to a given component.
Link copied to clipboard
Compares this component to a different one to check if they are the same This is used to be able to skip rendering a component again.
open fun isEquivalentTo(@Nullable other: Component, shouldCompareCommonProps: Boolean): Boolean
abstract fun isEquivalentTo(p: T): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun measure(c: ComponentContext, widthSpec: Int, heightSpec: Int, outputSize: Size)
Measure a component with the given SizeSpec constrain.
fun measure(c: ComponentContext, widthSpec: Int, heightSpec: Int, outputSize: Size, shouldCacheResult: Boolean)
Link copied to clipboard
fun measureMightNotCacheInternalNode(c: ComponentContext, widthSpec: Int, heightSpec: Int, outputSize: Size)
Should not be used!
Link copied to clipboard
open fun onCreateMountContentPool(): MountItemsPool.ItemPool
open fun onCreateMountContentPool(): MountItemsPool.ItemPool
Link copied to clipboard
open fun poolSize(): Int
open fun poolSize(): Int
Link copied to clipboard
Link copied to clipboard
abstract fun <T> setDebugAttributeKey(attributeKey: AttributeKey<T>, value: T)
open fun <T> setDebugAttributeKey(attributeKey: AttributeKey<T>, value: T)
Link copied to clipboard
Link copied to clipboard
open fun willRender(c: ComponentContext, component: Component): Boolean