package lombok.core;
import java.lang.annotation.Annotation;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import lombok.core.AST;
import lombok.permit.Permit;
/* loaded from: com.discord-121111.apk:lombok/core/AnnotationValues.SCL.lombok */
public class AnnotationValues {
private final Class type;
private final Map values;
private final LombokNode, ?, ?> ast;
private A cachedInstance = null;
/* renamed from: lombok.core.AnnotationValues$1 reason: invalid class name */
/* loaded from: com.discord-121111.apk:lombok/core/AnnotationValues$1.SCL.lombok */
class AnonymousClass1 implements InvocationHandler {
AnonymousClass1() {
}
@Override // java.lang.reflect.InvocationHandler
public Object invoke(Object obj, Method method, Object[] objArr) throws Throwable {
AnnotationValue annotationValue = (AnnotationValue) AnnotationValues.access$0(AnnotationValues.this).get(method.getName());
if (annotationValue == null) {
Object defaultValue = method.getDefaultValue();
if (defaultValue != null) {
return defaultValue;
}
throw AnnotationValues.access$1(annotationValue, method);
}
boolean z2 = false;
Class> returnType = method.getReturnType();
Object obj2 = null;
if (returnType.isArray()) {
z2 = true;
returnType = returnType.getComponentType();
obj2 = Array.newInstance(returnType, annotationValue.valueGuesses.size());
}
if (!z2 && annotationValue.valueGuesses.size() > 1) {
throw new AnnotationValueDecodeFail(annotationValue, "Expected a single value, but " + method.getName() + " has an array of values", -1);
} else if (annotationValue.valueGuesses.size() != 0 || z2) {
int i = 0;
Iterator