com.google.gson.internal
Class UnsafeAllocator

java.lang.Object
  extended by com.google.gson.internal.UnsafeAllocator

public abstract class UnsafeAllocator
extends java.lang.Object

Do sneaky things to allocate objects without invoking their constructors.

Author:
Joel Leitch, Jesse Wilson

Constructor Summary
UnsafeAllocator()
           
 
Method Summary
static UnsafeAllocator create()
           
abstract
<T> T
newInstance(java.lang.Class<T> c)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnsafeAllocator

public UnsafeAllocator()
Method Detail

newInstance

public abstract <T> T newInstance(java.lang.Class<T> c)
                       throws java.lang.Exception
Throws:
java.lang.Exception

create

public static UnsafeAllocator create()