BoundaryInterfaceReflectionUtil
open class BoundaryInterfaceReflectionUtil
kotlin.Any | |
↳ | org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil |
A set of utility methods used for calling across the support library boundary.
Summary
Public constructors |
|
---|---|
<init>() A set of utility methods used for calling across the support library boundary. |
Public methods |
|
---|---|
open static T |
castToSuppLibClass(clazz: Class<T>!, invocationHandler: InvocationHandler!) Returns an implementation of the boundary interface named clazz, by delegating method calls to the |
open static Boolean |
containsFeature(features: MutableCollection<String!>!, soughtFeature: String!) Check whether a set of features {@param features} contains a certain feature {@param * soughtFeature}. |
open static Boolean |
containsFeature(features: Array<String!>!, soughtFeature: String!) |
open static InvocationHandler! |
createInvocationHandlerFor(delegate: Any!) Create an |
open static Array<InvocationHandler!>! |
createInvocationHandlersForArray(delegates: Array<Any!>!) Plural version of |
open static Method! |
dupeMethod(method: Method!, delegateLoader: ClassLoader!) Utility method for fetching a method from {@param delegateLoader}, with the same signature (package + class + method name + parameters) as a given method defined in another classloader. |
open static Any! |
getDelegateFromInvocationHandler(invocationHandler: InvocationHandler!) Assuming that the given InvocationHandler was created in the current classloader and is an InvocationHandlerWithDelegateGetter, return the object the InvocationHandler delegates its method calls to. |
open static Boolean |
instanceOfInOwnClassLoader(obj: Any!, className: String!) Check if an object is an instance of |
Public constructors
<init>
BoundaryInterfaceReflectionUtil()
A set of utility methods used for calling across the support library boundary.
Public methods
castToSuppLibClass
open static fun <T : Any!> castToSuppLibClass(clazz: Class<T>!, invocationHandler: InvocationHandler!): T
Returns an implementation of the boundary interface named clazz, by delegating method calls to the InvocationHandler
invocationHandler.
containsFeature
open static fun containsFeature(features: MutableCollection<String!>!, soughtFeature: String!): Boolean
Check whether a set of features {@param features} contains a certain feature {@param * soughtFeature}.
containsFeature
open static fun containsFeature(features: Array<String!>!, soughtFeature: String!): Boolean
createInvocationHandlerFor
open static fun createInvocationHandlerFor(delegate: Any!): InvocationHandler!
Create an java.lang.reflect.InvocationHandler
that delegates method calls to {@param delegate}, making sure that the java.lang.reflect.Method
and parameters being passed to {@param delegate} exist in the same java.lang.ClassLoader
as {@param * delegate}.