jimu-decompiled/sources/org/aspectj/runtime/reflect/SignatureImpl.java
2025-05-13 19:24:51 +02:00

186 lines
4.9 KiB
Java

package org.aspectj.runtime.reflect;
import java.lang.ref.SoftReference;
import java.util.StringTokenizer;
import org.aspectj.lang.Signature;
/* loaded from: classes2.dex */
abstract class SignatureImpl implements Signature {
private static boolean h = true;
int a;
String b;
String c;
Class d;
Cache e;
private String f;
ClassLoader g = null;
private interface Cache {
void a(int i, String str);
String get(int i);
}
SignatureImpl(int i, String str, Class cls) {
this.a = -1;
this.a = i;
this.b = str;
this.d = cls;
}
private ClassLoader e() {
if (this.g == null) {
this.g = getClass().getClassLoader();
}
return this.g;
}
public Class a() {
if (this.d == null) {
this.d = c(2);
}
return this.d;
}
protected abstract String a(StringMaker stringMaker);
/* JADX WARN: Removed duplicated region for block: B:10:0x0026 */
/* JADX WARN: Removed duplicated region for block: B:7:0x001e */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
java.lang.String b(org.aspectj.runtime.reflect.StringMaker r3) {
/*
r2 = this;
boolean r0 = org.aspectj.runtime.reflect.SignatureImpl.h
if (r0 == 0) goto L1b
org.aspectj.runtime.reflect.SignatureImpl$Cache r0 = r2.e
if (r0 != 0) goto L14
org.aspectj.runtime.reflect.SignatureImpl$CacheImpl r0 = new org.aspectj.runtime.reflect.SignatureImpl$CacheImpl // Catch: java.lang.Throwable -> L10
r0.<init>() // Catch: java.lang.Throwable -> L10
r2.e = r0 // Catch: java.lang.Throwable -> L10
goto L1b
L10:
r0 = 0
org.aspectj.runtime.reflect.SignatureImpl.h = r0
goto L1b
L14:
int r1 = r3.i
java.lang.String r0 = r0.get(r1)
goto L1c
L1b:
r0 = 0
L1c:
if (r0 != 0) goto L22
java.lang.String r0 = r2.a(r3)
L22:
boolean r1 = org.aspectj.runtime.reflect.SignatureImpl.h
if (r1 == 0) goto L2d
org.aspectj.runtime.reflect.SignatureImpl$Cache r1 = r2.e
int r3 = r3.i
r1.a(r3, r0)
L2d:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: org.aspectj.runtime.reflect.SignatureImpl.b(org.aspectj.runtime.reflect.StringMaker):java.lang.String");
}
public int c() {
if (this.a == -1) {
this.a = a(0);
}
return this.a;
}
public String d() {
if (this.b == null) {
this.b = b(1);
}
return this.b;
}
public final String toString() {
return b(StringMaker.k);
}
private static final class CacheImpl implements Cache {
private SoftReference a;
public CacheImpl() {
b();
}
private String[] b() {
String[] strArr = new String[3];
this.a = new SoftReference(strArr);
return strArr;
}
@Override // org.aspectj.runtime.reflect.SignatureImpl.Cache
public void a(int i, String str) {
String[] a = a();
if (a == null) {
a = b();
}
a[i] = str;
}
@Override // org.aspectj.runtime.reflect.SignatureImpl.Cache
public String get(int i) {
String[] a = a();
if (a == null) {
return null;
}
return a[i];
}
private String[] a() {
return (String[]) this.a.get();
}
}
int a(int i) {
return Integer.parseInt(b(i), 16);
}
Class c(int i) {
return Factory.a(b(i), e());
}
Class[] d(int i) {
StringTokenizer stringTokenizer = new StringTokenizer(b(i), ":");
int countTokens = stringTokenizer.countTokens();
Class[] clsArr = new Class[countTokens];
for (int i2 = 0; i2 < countTokens; i2++) {
clsArr[i2] = Factory.a(stringTokenizer.nextToken(), e());
}
return clsArr;
}
public String b() {
if (this.c == null) {
this.c = a().getName();
}
return this.c;
}
String b(int i) {
int indexOf = this.f.indexOf(45);
int i2 = 0;
while (true) {
int i3 = i - 1;
if (i <= 0) {
break;
}
i2 = indexOf + 1;
indexOf = this.f.indexOf(45, i2);
i = i3;
}
if (indexOf == -1) {
indexOf = this.f.length();
}
return this.f.substring(i2, indexOf);
}
}