private getDeclaredField ( global par0 ) : global::java.lang.reflect.Field | ||
par0 | global | |
return | global::java.lang.reflect.Field |
public static void registerWidget(Class clazz) { if (Modifier.isAbstract(clazz.getModifiers())) return; DataType[] dataTypeArray1 = (DataType[]) null; SecurityException securityException; try { try { try { try { try { Field declaredField = clazz.getDeclaredField("TYPES", DisplayElementRegistry.__\u003CGetCallerID\u003E()); int modifiers = declaredField.getModifiers(); if (!Modifier.isStatic(modifiers)) { string str = "TYPES must be static"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new RuntimeException(str); } else if (!Modifier.isFinal(modifiers)) { string str = "TYPES must be final"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new RuntimeException(str); } else { dataTypeArray1 = (DataType[]) declaredField.get((object) null, DisplayElementRegistry.__\u003CGetCallerID\u003E()); DisplayElementRegistry.declaredTypes.put((object) clazz, (object) dataTypeArray1); goto label_22; } } catch (IllegalArgumentException ex) { } } catch (IllegalAccessException ex) { goto label_15; } } catch (NoSuchFieldException ex) { goto label_16; } } catch (SecurityException ex) { int num = 1; securityException = (SecurityException) ByteCodeHelper.MapException<SecurityException>((Exception) ex, (ByteCodeHelper.MapFlags) num); goto label_17; } } catch (Exception ex) { int num = 2; if (ByteCodeHelper.MapException<ClassCastException>(ex, (ByteCodeHelper.MapFlags) num) == null) throw; else goto label_18; } if (!DisplayElementRegistry.\u0024assertionsDisabled) { Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new AssertionError(); } else goto label_22; label_15: string str1 = "TYPES must be public"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new RuntimeException(str1); label_16: string str2 = "Every ValueBasedDisplayElement must have a TYPES static field of type DataType[]"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new RuntimeException(str2); label_17: Throwable.instancehelper_printStackTrace((Exception) securityException); return; label_18: string str3 = "TYPES must be of type Type[]"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new RuntimeException(str3); label_22: if (dataTypeArray1 == null) { string str4 = "TYPES must not be null"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new RuntimeException(str4); } else { DataType[] dataTypeArray2 = dataTypeArray1; int length = dataTypeArray2.Length; for (int index = 0; index < length; ++index) { DataType dataType = dataTypeArray2[index]; object obj1 = (object) (Set) DisplayElementRegistry.map.get((object) dataType); if ((Set) obj1 == null) DisplayElementRegistry.map.put((object) dataType, (object) (LinkedHashSet) (obj1 = (object) new LinkedHashSet())); object obj2 = obj1; object obj3 = (object) clazz; Set set1; if (obj2 != null) { Set set2 = obj2 as Set; if (set2 == null) throw new IncompatibleClassChangeError(); set1 = set2; } else set1 = (Set) null; object obj4 = obj3; set1.add(obj4); } } }
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(); }