CrackMe.apk
Download file
package kotlin.reflect.jvm.internal.impl.load.java.components;
import java.util.Map;
import kotlin.TuplesKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
import kotlin.reflect.jvm.internal.impl.load.java.JvmAnnotationNames;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaAnnotationDescriptor;
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotation;
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotationOwner;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* compiled from: JavaAnnotationMapper.kt */
public final class JavaAnnotationMapper {
private static final Name DEPRECATED_ANNOTATION_MESSAGE;
public static final JavaAnnotationMapper INSTANCE = new JavaAnnotationMapper();
private static final Name RETENTION_ANNOTATION_VALUE;
private static final Name TARGET_ANNOTATION_ALLOWED_TARGETS;
private static final Map<FqName, FqName> javaToKotlinNameMap = MapsKt.mapOf(TuplesKt.to(JvmAnnotationNames.TARGET_ANNOTATION, StandardNames.FqNames.target), TuplesKt.to(JvmAnnotationNames.RETENTION_ANNOTATION, StandardNames.FqNames.retention), TuplesKt.to(JvmAnnotationNames.DEPRECATED_ANNOTATION, StandardNames.FqNames.deprecated), TuplesKt.to(JvmAnnotationNames.DOCUMENTED_ANNOTATION, StandardNames.FqNames.mustBeDocumented));
private static final Map<FqName, FqName> kotlinToJavaNameMap = MapsKt.mapOf(TuplesKt.to(StandardNames.FqNames.target, JvmAnnotationNames.TARGET_ANNOTATION), TuplesKt.to(StandardNames.FqNames.retention, JvmAnnotationNames.RETENTION_ANNOTATION), TuplesKt.to(StandardNames.FqNames.mustBeDocumented, JvmAnnotationNames.DOCUMENTED_ANNOTATION));
private JavaAnnotationMapper() {
}
static {
Name identifier = Name.identifier("message");
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(\"message\")");
DEPRECATED_ANNOTATION_MESSAGE = identifier;
Name identifier2 = Name.identifier("allowedTargets");
Intrinsics.checkNotNullExpressionValue(identifier2, "identifier(\"allowedTargets\")");
TARGET_ANNOTATION_ALLOWED_TARGETS = identifier2;
Name identifier3 = Name.identifier("value");
Intrinsics.checkNotNullExpressionValue(identifier3, "identifier(\"value\")");
RETENTION_ANNOTATION_VALUE = identifier3;
}
public final Name getDEPRECATED_ANNOTATION_MESSAGE$descriptors_jvm() {
return DEPRECATED_ANNOTATION_MESSAGE;
}
public final Name getTARGET_ANNOTATION_ALLOWED_TARGETS$descriptors_jvm() {
return TARGET_ANNOTATION_ALLOWED_TARGETS;
}
public final Name getRETENTION_ANNOTATION_VALUE$descriptors_jvm() {
return RETENTION_ANNOTATION_VALUE;
}
public static /* synthetic */ AnnotationDescriptor mapOrResolveJavaAnnotation$default(JavaAnnotationMapper javaAnnotationMapper, JavaAnnotation javaAnnotation, LazyJavaResolverContext lazyJavaResolverContext, boolean z, int i, Object obj) {
if ((i & 4) != 0) {
z = false;
}
return javaAnnotationMapper.mapOrResolveJavaAnnotation(javaAnnotation, lazyJavaResolverContext, z);
}
public final AnnotationDescriptor mapOrResolveJavaAnnotation(JavaAnnotation javaAnnotation, LazyJavaResolverContext lazyJavaResolverContext, boolean z) {
Intrinsics.checkNotNullParameter(javaAnnotation, "annotation");
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "c");
ClassId classId = javaAnnotation.getClassId();
if (Intrinsics.areEqual((Object) classId, (Object) ClassId.topLevel(JvmAnnotationNames.TARGET_ANNOTATION))) {
return new JavaTargetAnnotationDescriptor(javaAnnotation, lazyJavaResolverContext);
}
if (Intrinsics.areEqual((Object) classId, (Object) ClassId.topLevel(JvmAnnotationNames.RETENTION_ANNOTATION))) {
return new JavaRetentionAnnotationDescriptor(javaAnnotation, lazyJavaResolverContext);
}
if (Intrinsics.areEqual((Object) classId, (Object) ClassId.topLevel(JvmAnnotationNames.DOCUMENTED_ANNOTATION))) {
return new JavaAnnotationDescriptor(lazyJavaResolverContext, javaAnnotation, StandardNames.FqNames.mustBeDocumented);
}
if (Intrinsics.areEqual((Object) classId, (Object) ClassId.topLevel(JvmAnnotationNames.DEPRECATED_ANNOTATION))) {
return null;
}
return new LazyJavaAnnotationDescriptor(lazyJavaResolverContext, javaAnnotation, z);
}
public final AnnotationDescriptor findMappedJavaAnnotation(FqName fqName, JavaAnnotationOwner javaAnnotationOwner, LazyJavaResolverContext lazyJavaResolverContext) {
JavaAnnotation findAnnotation;
Intrinsics.checkNotNullParameter(fqName, "kotlinName");
Intrinsics.checkNotNullParameter(javaAnnotationOwner, "annotationOwner");
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "c");
if (Intrinsics.areEqual((Object) fqName, (Object) StandardNames.FqNames.deprecated)) {
FqName fqName2 = JvmAnnotationNames.DEPRECATED_ANNOTATION;
Intrinsics.checkNotNullExpressionValue(fqName2, "DEPRECATED_ANNOTATION");
JavaAnnotation findAnnotation2 = javaAnnotationOwner.findAnnotation(fqName2);
if (findAnnotation2 != null || javaAnnotationOwner.isDeprecatedInJavaDoc()) {
return new JavaDeprecatedAnnotationDescriptor(findAnnotation2, lazyJavaResolverContext);
}
}
FqName fqName3 = kotlinToJavaNameMap.get(fqName);
if (fqName3 == null || (findAnnotation = javaAnnotationOwner.findAnnotation(fqName3)) == null) {
return null;
}
return mapOrResolveJavaAnnotation$default(INSTANCE, findAnnotation, lazyJavaResolverContext, false, 4, (Object) null);
}
}
Download file