Package org.robolectric.interceptors
Class AndroidInterceptors.CleanerInterceptor
java.lang.Object
org.robolectric.internal.bytecode.Interceptor
org.robolectric.interceptors.AndroidInterceptors.CleanerInterceptor
- Enclosing class:
- AndroidInterceptors
public static class AndroidInterceptors.CleanerInterceptor extends Interceptor
Maps calls to Cleaner, which moved between Java 8 and 9:
sun.misc.Cleaner.create()->new java.lang.ref.Cleaner().register()sun.misc.Cleaner.clean()->java.lang.ref.Cleaner.Cleanable().clean()
-
Constructor Summary
Constructors Constructor Description CleanerInterceptor() -
Method Summary
Modifier and Type Method Description MethodHandlegetMethodHandle(String methodName, MethodType type)Function<Object,Object>handle(MethodSignature methodSignature)Methods inherited from class org.robolectric.internal.bytecode.Interceptor
getMethodRefs, returnDefaultValue
-
Constructor Details
-
CleanerInterceptor
public CleanerInterceptor()
-
-
Method Details
-
handle
- Specified by:
handlein classInterceptor
-
getMethodHandle
public MethodHandle getMethodHandle(String methodName, MethodType type) throws NoSuchMethodException, IllegalAccessException- Specified by:
getMethodHandlein classInterceptor- Throws:
NoSuchMethodExceptionIllegalAccessException
-