Package com.google.gson.internal
Class ConstructorConstructor
- java.lang.Object
-
- com.google.gson.internal.ConstructorConstructor
-
public final class ConstructorConstructor extends java.lang.ObjectReturns a function that can construct an instance of a requested type.
-
-
Constructor Summary
Constructors Constructor Description ConstructorConstructor(java.util.Map<java.lang.reflect.Type,InstanceCreator<?>> instanceCreators, boolean useJdkUnsafe, java.util.List<ReflectionAccessFilter> reflectionFilters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> ObjectConstructor<T>get(TypeToken<T> typeToken)Callsget(TypeToken, boolean), and allows usage of JDK Unsafe.<T> ObjectConstructor<T>get(TypeToken<T> typeToken, boolean allowUnsafe)Retrieves an object constructor for the given type.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ConstructorConstructor
public ConstructorConstructor(java.util.Map<java.lang.reflect.Type,InstanceCreator<?>> instanceCreators, boolean useJdkUnsafe, java.util.List<ReflectionAccessFilter> reflectionFilters)
-
-
Method Detail
-
get
public <T> ObjectConstructor<T> get(TypeToken<T> typeToken)
Callsget(TypeToken, boolean), and allows usage of JDK Unsafe.
-
get
public <T> ObjectConstructor<T> get(TypeToken<T> typeToken, boolean allowUnsafe)
Retrieves an object constructor for the given type.- Parameters:
typeToken- type for which a constructor should be retrievedallowUnsafe- whether to allow usage of JDK Unsafe; has no effect ifuseJdkUnsafeis false
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-