Initial commit
This commit is contained in:
14
sources/com/google/common/reflect/Reflection.java
Normal file
14
sources/com/google/common/reflect/Reflection.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.google.common.reflect;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Proxy;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class Reflection {
|
||||
public static <T> T a(Class<T> cls, InvocationHandler invocationHandler) {
|
||||
Preconditions.a(invocationHandler);
|
||||
Preconditions.a(cls.isInterface(), "%s is not an interface", cls);
|
||||
return cls.cast(Proxy.newProxyInstance(cls.getClassLoader(), new Class[]{cls}, invocationHandler));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user