15 lines
535 B
Java
15 lines
535 B
Java
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));
|
|
}
|
|
}
|