Exemplo n.º 1
0
 public static UnsafeAllocator create() {
   Object obj;
   try {
     obj = Class.forName("sun.misc.Unsafe");
     Object obj3 = ((Class) (obj)).getDeclaredField("theUnsafe");
     ((Field) (obj3)).setAccessible(true);
     obj3 = ((Field) (obj3)).get(null);
     obj =
         new q(
             ((Class) (obj)).getMethod("allocateInstance", new Class[] {java / lang / Class}),
             obj3);
   } catch (Exception exception) {
     Object obj1;
     try {
       obj1 =
           java
               / io
               / ObjectInputStream.getDeclaredMethod(
                   "newInstance", new Class[] {java / lang / Class, java / lang / Class});
       ((Method) (obj1)).setAccessible(true);
       obj1 = new r(((Method) (obj1)));
     } catch (Exception exception1) {
       Object obj2;
       try {
         obj2 =
             java
                 / io
                 / ObjectStreamClass.getDeclaredMethod(
                     "getConstructorId", new Class[] {java / lang / Class});
         ((Method) (obj2)).setAccessible(true);
         int i =
             ((Integer) ((Method) (obj2)).invoke(null, new Object[] {java / lang / Object}))
                 .intValue();
         obj2 =
             java
                 / io
                 / ObjectStreamClass.getDeclaredMethod(
                     "newInstance", new Class[] {java / lang / Class, Integer.TYPE});
         ((Method) (obj2)).setAccessible(true);
         obj2 = new s(((Method) (obj2)), i);
       } catch (Exception exception2) {
         return new t();
       }
       return ((UnsafeAllocator) (obj2));
     }
     return ((UnsafeAllocator) (obj1));
   }
   return ((UnsafeAllocator) (obj));
 }