test_class.file: webbeans-impl/src/test/java/org/apache/webbeans/proxy/UnsafeTest.java
test_class.identifier: UnsafeTest
test_case.body: @Test
      public void ensureUnsafeIsAvailable()
      {
          final Unsafe unsafe = new Unsafe();
          final SpyConstructor obj = unsafe.unsafeNewInstance(SpyConstructor.class);
          assertNotNull(obj);
          assertFalse(obj.called);
      }
test_case.class_method_signature: UnsafeTest.ensureUnsafeIsAvailable()
test_case.full_signature: @Test public void ensureUnsafeIsAvailable()
test_case.identifier: ensureUnsafeIsAvailable
test_case.invocations: unsafeNewInstance assertNotNull assertFalse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void ensureUnsafeIsAvailable()
focal_class.declarator: unsafe
focal_class.modifier: private
focal_class.original_string: private Object unsafe;
focal_class.type: Object
focal_class.var_name: unsafe
focal_class.declarator: internalUnsafe
focal_class.modifier: private
focal_class.original_string: private Object internalUnsafe;
focal_class.type: Object
focal_class.var_name: internalUnsafe
focal_class.declarator: unsafeAllocateInstance
focal_class.modifier: private
focal_class.original_string: private Method unsafeAllocateInstance;
focal_class.type: Method
focal_class.var_name: unsafeAllocateInstance
focal_class.declarator: unsafeDefineClass = new AtomicReference<>()
focal_class.modifier: private final
focal_class.original_string: private final AtomicReference<Method> unsafeDefineClass = new AtomicReference<>();
focal_class.type: AtomicReference<Method>
focal_class.var_name: unsafeDefineClass
focal_class.file: webbeans-impl/src/main/java/org/apache/webbeans/proxy/Unsafe.java
focal_class.identifier: Unsafe
focal_class.class_method_signature: Unsafe.Unsafe()
focal_class.full_signature: public  Unsafe()
focal_class.identifier: Unsafe
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Unsafe()
focal_class.class_method_signature: Unsafe.defineAndLoadClass(ClassLoader classLoader, String proxyName, byte[] proxyBytes)
focal_class.full_signature: public Class<T> defineAndLoadClass(ClassLoader classLoader, String proxyName, byte[] proxyBytes)
focal_class.identifier: defineAndLoadClass
focal_class.modifiers: public
focal_class.parameters: (ClassLoader classLoader, String proxyName, byte[] proxyBytes)
focal_class.return: Class<T>
focal_class.signature: Class<T> defineAndLoadClass(ClassLoader classLoader, String proxyName, byte[] proxyBytes)
focal_class.class_method_signature: Unsafe.unsafeDefineClass()
focal_class.full_signature: private Method unsafeDefineClass()
focal_class.identifier: unsafeDefineClass
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Method
focal_class.signature: Method unsafeDefineClass()
focal_class.class_method_signature: Unsafe.unsafeNewInstance(Class<T> clazz)
focal_class.full_signature: public T unsafeNewInstance(Class<T> clazz)
focal_class.identifier: unsafeNewInstance
focal_class.modifiers: public
focal_class.parameters: (Class<T> clazz)
focal_class.return: T
focal_class.signature: T unsafeNewInstance(Class<T> clazz)
focal_class.class_method_signature: Unsafe.getUnsafeClass()
focal_class.full_signature: private Class<?> getUnsafeClass()
focal_class.identifier: getUnsafeClass
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Class<?>
focal_class.signature: Class<?> getUnsafeClass()
focal_method.body: public <T> T unsafeNewInstance(Class<T> clazz)
      {
          try
          {
              if (unsafeAllocateInstance != null)
              {
                  return (T) unsafeAllocateInstance.invoke(unsafe, clazz);
              }
              else
              {
                  try
                  {
                      return clazz.getConstructor().newInstance();
                  }
                  catch (final Exception e)
                  {
                      throw new IllegalStateException("Failed to allocateInstance of Proxy class " + clazz.getName(), e);
                  }
              }
          }
          catch (IllegalAccessException e)
          {
              throw new IllegalStateException("Failed to allocateInstance of Proxy class " + clazz.getName(), e);
          }
          catch (InvocationTargetException e)
          {
              Throwable throwable = e.getTargetException() != null ? e.getTargetException() : e;
              throw new IllegalStateException("Failed to allocateInstance of Proxy class " + clazz.getName(),
                      throwable);
          }
      }
focal_method.class_method_signature: Unsafe.unsafeNewInstance(Class<T> clazz)
focal_method.full_signature: public T unsafeNewInstance(Class<T> clazz)
focal_method.identifier: unsafeNewInstance
focal_method.invocations: invoke newInstance getConstructor getName getName getTargetException getTargetException getName
focal_method.modifiers: public
focal_method.parameters: (Class<T> clazz)
focal_method.return: T
focal_method.signature: T unsafeNewInstance(Class<T> clazz)