Deprecate JavaMethodWrapper (#53124)

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

Deprecate LegacyArchitecture class JavaMethodWrapperchagelog:

changelog: [Android][Changed] Deprecate LegacyArchitecture class JavaMethodWrapper

Reviewed By: mlord93

Differential Revision: D79672296

fbshipit-source-id: 05432263c4452294c667226cb8e062c50f036931
This commit is contained in:
David Vacca
2025-08-09 04:39:35 -07:00
committed by Facebook GitHub Bot
parent c4715886a9
commit 19a99dd088
2 changed files with 4 additions and 0 deletions
@@ -17,6 +17,9 @@ import com.facebook.systrace.SystraceMessage
import java.lang.reflect.InvocationTargetException
import java.lang.reflect.Method
@Deprecated(
message = "This class is part of Legacy Architecture and will be removed in a future release",
level = DeprecationLevel.WARNING)
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
internal class JavaMethodWrapper(
private val moduleWrapper: JavaModuleWrapper,
@@ -74,6 +74,7 @@ internal class JavaModuleWrapper(
targetMethod.getAnnotation(ReactMethod::class.java)?.let { annotation ->
val methodName = targetMethod.name
val md = MethodDescriptor()
@Suppress("DEPRECATION")
val method = JavaMethodWrapper(this, targetMethod, annotation.isBlockingSynchronousMethod)
md.name = methodName
md.type = method.type