Fix unresolved KDoc references (#51142)

Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. This is just another round addressing several of them.

## Changelog:

[INTERNAL] - Fix unresolved KDoc references

Pull Request resolved: https://github.com/facebook/react-native/pull/51142

Test Plan: Verify that the comments link the classes correctly using Android Studio.

Reviewed By: rshest

Differential Revision: D74305933

Pulled By: javache

fbshipit-source-id: f512a33fa5da46fb828bb76bd95d9502261ea08a
This commit is contained in:
Mateo Guzmán
2025-05-07 03:31:30 -07:00
committed by Facebook GitHub Bot
parent e48b496665
commit f9225635bf
13 changed files with 45 additions and 36 deletions
@@ -8,9 +8,10 @@
package com.facebook.react.bridge
/**
* Extends RuntimeException so that it may be caught by a [ReactSoftExceptionListener]. Any
* [ReactSoftExceptionListener] that catches a ReactNoCrashSoftException should log it only and not
* crash, no matter what.
* Extends RuntimeException so that it may be caught by a
* [ReactSoftExceptionLogger.ReactSoftExceptionListener]. Any
* [ReactSoftExceptionLogger.ReactSoftExceptionListener] that catches a ReactNoCrashSoftException
* should log it only and not crash, no matter what.
*/
public open class ReactNoCrashSoftException : RuntimeException {
@@ -30,7 +30,7 @@ public object ReactBuildConfig {
@JvmField public val EXOPACKAGE_FLAGS: Int = BuildConfig.EXOPACKAGE_FLAGS
/** [Experimental] Enable React Native DevTools in release builds. */
/** **Experimental** Enable React Native DevTools in release builds. */
@JvmField
public val UNSTABLE_ENABLE_FUSEBOX_RELEASE: Boolean = BuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE
@@ -14,8 +14,9 @@ import android.view.View
import android.widget.EditText
/**
* A class allows recognizing double key tap of "R", used to reload JS in [AbstractReactActivity],
* [RedBoxDialogSurfaceDelegate] and [com.facebook.react.ReactActivity].
* A class allows recognizing double key tap of "R", used to reload JS in
* [com.facebook.react.ReactDelegate], [RedBoxDialogSurfaceDelegate] and
* [com.facebook.react.ReactActivity].
*/
public class DoubleTapReloadRecognizer {
private var doRefresh = false
@@ -16,8 +16,9 @@ import com.facebook.react.uimanager.debug.NotThreadSafeViewHierarchyUpdateDebugL
/**
* Debug object that listens to bridge busy/idle events and UiManagerModule dispatches and uses it
* to calculate whether JS was able to update the UI during a given frame. After being installed on
* a [ReactBridge] and a [UIManagerModule], [.getDidJSHitFrameAndCleanup] should be called once per
* frame via a [Choreographer.FrameCallback].
* a [ReactBridge] and a [com.facebook.react.uimanager.UIManagerModule],
* [.getDidJSHitFrameAndCleanup] should be called once per frame via a
* [android.view.Choreographer.FrameCallback].
*/
internal class DidJSUpdateUiDuringFrameDetector :
NotThreadSafeBridgeIdleDebugListener, NotThreadSafeViewHierarchyUpdateDebugListener {
@@ -53,10 +54,10 @@ internal class DidJSUpdateUiDuringFrameDetector :
}
/**
* Designed to be called from a [Choreographer.FrameCallback.doFrame] call.
* Designed to be called from a [android.view.Choreographer.FrameCallback.doFrame] call.
*
* There are two 'success' cases that will cause [.getDidJSHitFrameAndCleanup] to return true for
* a given frame:
* There are two 'success' cases that will cause [getDidJSHitFrameAndCleanup] to return true for a
* given frame:
* 1. UIManagerModule finished dispatching a batched UI update on the UI thread during the frame.
* This means that during the next hierarchy traversal, new UI will be drawn if needed (good).
* 1. The bridge ended the frame idle (meaning there were no JS nor native module calls still in
@@ -67,10 +68,10 @@ internal class DidJSUpdateUiDuringFrameDetector :
* NB: This call can only be called once for a given frame time range because it cleans up events
* it recorded for that frame.
*
* NB2: This makes the assumption that onViewHierarchyUpdateEnqueued is called from the
* [ ][UIManagerModule.onBatchComplete], e.g. while the bridge is still considered busy, which
* means there is no race condition where the bridge has gone idle but a hierarchy update is
* waiting to be enqueued.
* NB2: This makes the assumption that [onViewHierarchyUpdateEnqueued] is called from the
* [com.facebook.react.uimanager.UIManagerModule.onBatchComplete], e.g. while the bridge is still
* considered busy, which means there is no race condition where the bridge has gone idle but a
* hierarchy update is waiting to be enqueued.
*
* @param frameStartTimeNanos the time in nanos that the last frame started
* @param frameEndTimeNanos the time in nanos that the last frame ended
@@ -145,7 +145,8 @@ constructor(
* Get the default Fresco configuration builder. Allows adding of configuration options in
* addition to the default values.
*
* @return [ImagePipelineConfig.Builder] that has been initialized with default values
* @return [com.facebook.imagepipeline.core.ImagePipelineConfig.Builder] that has been
* initialized with default values
*/
@JvmStatic
public fun getDefaultConfigBuilder(context: ReactContext): ImagePipelineConfig.Builder {
@@ -79,8 +79,8 @@ import kotlin.collections.Collection
import kotlin.jvm.JvmStatic
/**
* A replacement for [com.facebook.react.CatalystInstance] responsible for creating and managing a
* React Native instance
* A replacement for [com.facebook.react.bridge.CatalystInstance] responsible for creating and
* managing a React Native instance
*/
@ThreadSafe
@DoNotStrip
@@ -13,7 +13,7 @@ import javax.annotation.concurrent.NotThreadSafe
/**
* Provides implementation of common tasks for view and it's view manager supporting property
* [removeClippedSubviews].
* [com.facebook.react.uimanager.ReactClippingViewGroup.removeClippedSubviews].
*/
@NotThreadSafe
public object ReactClippingViewGroupHelper {
@@ -23,9 +23,10 @@ public object ReactClippingViewGroupHelper {
private val helperRect: Rect = Rect()
/**
* Can be used by view that support [removeClippedSubviews] property to calculate area that given
* [view] should be clipped to based on the clipping rectangle of it's parent in case when parent
* is also set to clip it's children.
* Can be used by view that support
* [com.facebook.react.uimanager.ReactClippingViewGroup.removeClippedSubviews] property to
* calculate area that given [view] should be clipped to based on the clipping rectangle of it's
* parent in case when parent is also set to clip it's children.
*
* @param view view that we want to calculate clipping rect for
* @param outputRect where the calculated rectangle will be written
@@ -16,11 +16,11 @@ import com.facebook.react.bridge.ReadableMap
* accessor methods of [ReadableMap] by adding a default value property such that caller is enforced
* to provide a default value for a style property.
*
* Instances of this class are used to update [View] or [CSSNode] style properties. Since properties
* are generated by React framework based on what has been updated each value in this map should
* either be interpreted as a new value set for a style property or as a "reset this property to
* default" command in case when value is null (this is a way React communicates change in which the
* style key that was previously present in a map has been removed).
* Instances of this class are used to update [android.view.View] or [CSSNode] style properties.
* Since properties are generated by React framework based on what has been updated each value in
* this map should either be interpreted as a new value set for a style property or as a "reset this
* property to default" command in case when value is null (this is a way React communicates change
* in which the style key that was previously present in a map has been removed).
*
* NOTE: Accessor method with default value will throw an exception when the key is not present in
* the map. Style applicator logic should verify whether the key exists in the map using [.hasKey]
@@ -28,7 +28,7 @@ package com.facebook.react.uimanager.annotations
* value that is going to be used: [defaultBoolean], [defaultDouble], etc.)
*
* Since in case of property removal for non-primitive value type setter will be called with value
* set to `null` it's required that value type is annotated with [Nullable].
* set to `null` it's required that value type is annotated with [androidx.annotation.Nullable].
*
* Note: Since boolean property type can be represented both as primitive and wrapped default value
* set through [defaultBoolean] is only respected for primitive type and for the wrapped type `null`
@@ -24,9 +24,9 @@ import com.facebook.react.common.SystemClock.uptimeMillis
* future and it is highly recommended to use only `getEventData`.
*
* Old, pre-Fabric Events only used viewTag as the identifier, but Fabric needs surfaceId as well as
* viewTag. You may use [UIManagerHelper.getSurfaceId] on a Fabric-managed View to get the
* surfaceId. Fabric will work without surfaceId - making [Event] backwards-compatible - but Events
* without SurfaceId are slightly slower to propagate.
* viewTag. You may use [com.facebook.react.uimanager.UIManagerHelper.getSurfaceId] on a
* Fabric-managed View to get the surfaceId. Fabric will work without surfaceId - making [Event]
* backwards-compatible - but Events without SurfaceId are slightly slower to propagate.
*/
public abstract class Event<T : Event<T>> {
public var isInitialized: Boolean = false
@@ -16,7 +16,7 @@ import com.facebook.react.uimanager.common.ViewUtil
import com.facebook.react.views.view.ReactViewGroup
import com.facebook.react.views.view.ReactViewManager
/** View manager for [ReactHorizontalScrollContainerView] components. */
/** View manager for [ReactHorizontalScrollContainerLegacyView] components. */
@ReactModule(name = ReactHorizontalScrollContainerViewManager.REACT_CLASS)
public class ReactHorizontalScrollContainerViewManager : ReactViewManager() {
public override fun getName(): String = REACT_CLASS
@@ -29,9 +29,10 @@ import com.facebook.react.views.text.DefaultStyleValuesUtil.getDefaultTextColorH
/**
* Previously a superclass of multiple text view managers. Now only used by [ReactTextViewManager].
*
* This is a "shadowing" view manager, which means that the [NativeViewHierarchyManager] will NOT
* manage children of native [TextView] instances instantiated by this manager. Instead we
* use @{link ReactBaseTextShadowNode} hierarchy to calculate a [Spannable] text represented the
* This is a "shadowing" view manager, which means that the
* [com.facebook.react.uimanager.NativeViewHierarchyManager] will NOT manage children of native
* [android.widget.TextView] instances instantiated by this manager. Instead we use @{link
* ReactBaseTextShadowNode} hierarchy to calculate a [android.text.Spannable] text represented the
* whole text subtree.
*/
internal abstract class ReactTextAnchorViewManager<C : ReactBaseTextShadowNode?> :
@@ -48,7 +48,10 @@ import org.mockito.kotlin.verify
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
/** Verify that [ScalingUtils] properties are being applied correctly by [ReactImageManager]. */
/**
* Verify that [com.facebook.drawee.drawable.ScalingUtils] properties are being applied correctly by
* [ReactImageManager].
*/
@RunWith(RobolectricTestRunner::class)
class ReactImagePropertyTest {