111 lines
3.7 KiB
Java
111 lines
3.7 KiB
Java
package org.aspectj.runtime.reflect;
|
|
|
|
import java.util.Hashtable;
|
|
import java.util.StringTokenizer;
|
|
import org.aspectj.lang.JoinPoint;
|
|
import org.aspectj.lang.Signature;
|
|
import org.aspectj.lang.reflect.MethodSignature;
|
|
import org.aspectj.lang.reflect.SourceLocation;
|
|
import org.aspectj.runtime.reflect.JoinPointImpl;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class Factory {
|
|
static Hashtable e = new Hashtable();
|
|
private static Object[] f;
|
|
static /* synthetic */ Class g;
|
|
Class a;
|
|
ClassLoader b;
|
|
String c;
|
|
int d = 0;
|
|
|
|
static {
|
|
e.put("void", Void.TYPE);
|
|
e.put("boolean", Boolean.TYPE);
|
|
e.put("byte", Byte.TYPE);
|
|
e.put("char", Character.TYPE);
|
|
e.put("short", Short.TYPE);
|
|
e.put("int", Integer.TYPE);
|
|
e.put("long", Long.TYPE);
|
|
e.put("float", Float.TYPE);
|
|
e.put("double", Double.TYPE);
|
|
f = new Object[0];
|
|
}
|
|
|
|
public Factory(String str, Class cls) {
|
|
this.c = str;
|
|
this.a = cls;
|
|
this.b = cls.getClassLoader();
|
|
}
|
|
|
|
static Class a(String str, ClassLoader classLoader) {
|
|
if (str.equals("*")) {
|
|
return null;
|
|
}
|
|
Class cls = (Class) e.get(str);
|
|
if (cls != null) {
|
|
return cls;
|
|
}
|
|
try {
|
|
return classLoader == null ? Class.forName(str) : Class.forName(str, false, classLoader);
|
|
} catch (ClassNotFoundException unused) {
|
|
Class cls2 = g;
|
|
if (cls2 != null) {
|
|
return cls2;
|
|
}
|
|
Class a = a("java.lang.ClassNotFoundException");
|
|
g = a;
|
|
return a;
|
|
}
|
|
}
|
|
|
|
static /* synthetic */ Class a(String str) {
|
|
try {
|
|
return Class.forName(str);
|
|
} catch (ClassNotFoundException e2) {
|
|
throw new NoClassDefFoundError(e2.getMessage());
|
|
}
|
|
}
|
|
|
|
public JoinPoint.StaticPart a(String str, Signature signature, int i) {
|
|
int i2 = this.d;
|
|
this.d = i2 + 1;
|
|
return new JoinPointImpl.StaticPartImpl(i2, str, signature, a(i, -1));
|
|
}
|
|
|
|
public static JoinPoint a(JoinPoint.StaticPart staticPart, Object obj, Object obj2) {
|
|
return new JoinPointImpl(staticPart, obj, obj2, f);
|
|
}
|
|
|
|
public static JoinPoint a(JoinPoint.StaticPart staticPart, Object obj, Object obj2, Object obj3) {
|
|
return new JoinPointImpl(staticPart, obj, obj2, new Object[]{obj3});
|
|
}
|
|
|
|
public MethodSignature a(String str, String str2, String str3, String str4, String str5, String str6, String str7) {
|
|
int parseInt = Integer.parseInt(str, 16);
|
|
Class a = a(str3, this.b);
|
|
StringTokenizer stringTokenizer = new StringTokenizer(str4, ":");
|
|
int countTokens = stringTokenizer.countTokens();
|
|
Class[] clsArr = new Class[countTokens];
|
|
for (int i = 0; i < countTokens; i++) {
|
|
clsArr[i] = a(stringTokenizer.nextToken(), this.b);
|
|
}
|
|
StringTokenizer stringTokenizer2 = new StringTokenizer(str5, ":");
|
|
int countTokens2 = stringTokenizer2.countTokens();
|
|
String[] strArr = new String[countTokens2];
|
|
for (int i2 = 0; i2 < countTokens2; i2++) {
|
|
strArr[i2] = stringTokenizer2.nextToken();
|
|
}
|
|
StringTokenizer stringTokenizer3 = new StringTokenizer(str6, ":");
|
|
int countTokens3 = stringTokenizer3.countTokens();
|
|
Class[] clsArr2 = new Class[countTokens3];
|
|
for (int i3 = 0; i3 < countTokens3; i3++) {
|
|
clsArr2[i3] = a(stringTokenizer3.nextToken(), this.b);
|
|
}
|
|
return new MethodSignatureImpl(parseInt, str2, a, clsArr, strArr, clsArr2, a(str7, this.b));
|
|
}
|
|
|
|
public SourceLocation a(int i, int i2) {
|
|
return new SourceLocationImpl(this.a, this.c, i);
|
|
}
|
|
}
|