public static string getLibraryName(Class cls) { return new StringBuilder().append("jni").append(cls.getSimpleName()).toString(); }
public virtual Runner buildRunner(Class runnerClass, Class testClass) { Runner runner1; try { Class class1 = runnerClass; Class[] classArray = new Class[1]; int index1 = 0; // ISSUE: variable of the null type __Null local = ClassLiteral<Class>.Value; classArray[index1] = (Class) local; CallerID callerId1 = AnnotatedBuilder.__\u003CGetCallerID\u003E(); Constructor constructor = class1.getConstructor(classArray, callerId1); object[] objArray = new object[1]; int index2 = 0; Class class2 = testClass; objArray[index2] = (object) class2; CallerID callerId2 = AnnotatedBuilder.__\u003CGetCallerID\u003E(); runner1 = (Runner) constructor.newInstance(objArray, callerId2); } catch (NoSuchMethodException ex) { goto label_3; } return runner1; label_3: Runner runner2; try { Class class1 = runnerClass; Class[] classArray = new Class[2]; int index1 = 0; // ISSUE: variable of the null type __Null local1 = ClassLiteral<Class>.Value; classArray[index1] = (Class) local1; int index2 = 1; // ISSUE: variable of the null type __Null local2 = ClassLiteral<RunnerBuilder>.Value; classArray[index2] = (Class) local2; CallerID callerId1 = AnnotatedBuilder.__\u003CGetCallerID\u003E(); Constructor constructor = class1.getConstructor(classArray, callerId1); object[] objArray = new object[2]; int index3 = 0; Class class2 = testClass; objArray[index3] = (object) class2; int index4 = 1; RunnerBuilder runnerBuilder = this.fSuiteBuilder; objArray[index4] = (object) runnerBuilder; CallerID callerId2 = AnnotatedBuilder.__\u003CGetCallerID\u003E(); runner2 = (Runner) constructor.newInstance(objArray, callerId2); } catch (NoSuchMethodException ex) { goto label_7; } return runner2; label_7: string simpleName = runnerClass.getSimpleName(); string str1 = "Custom runner class %s should have a public constructor with signature %s(Class testClass)"; object[] objArray1 = new object[2]; int index5 = 0; string str2 = simpleName; objArray1[index5] = (object) str2; int index6 = 1; string str3 = simpleName; objArray1[index6] = (object) str3; string @string = String.format(str1, objArray1); Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new InitializationError(@string); }
public static string getName(Class clazz) { string str1; try { Field declaredField = clazz.getDeclaredField("NAME", DisplayElement.__\u003CGetCallerID\u003E()); int modifiers = declaredField.getModifiers(); if (!Modifier.isStatic(modifiers)) { string str2 = "TYPES must be static"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new RuntimeException(str2); } else if (!Modifier.isFinal(modifiers)) { string str2 = "TYPES must be final"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new RuntimeException(str2); } else if (Modifier.isStatic(modifiers)) { if (Modifier.isFinal(modifiers)) str1 = (string) declaredField.get((object) null, DisplayElement.__\u003CGetCallerID\u003E()); else goto label_11; } else goto label_11; } catch (Exception ex) { int num = 2; if (ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num) == null) throw; else goto label_10; } return str1; label_10: label_11: return clazz.getSimpleName(); }