Package com.jsoniter.spi
Class TypeLiteral<T>
java.lang.Object
com.jsoniter.spi.TypeLiteral<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final String
(package private) final String
(package private) final TypeLiteral.NativeType
static Map
<Type, TypeLiteral.NativeType> (package private) final Type
private static Map
<Type, TypeLiteral> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructs a new type literal.TypeLiteral
(Type type, String decoderCacheKey, String encoderCacheKey) -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeLiteral
private static TypeLiteral
private static String
private static String
generateCacheKey
(Type type, String prefix) private static String
generateDecoderCacheKey
(Type type) private static String
generateEncoderCacheKey
(Type type) getDecoderCacheKey
(String configName) getEncoderCacheKey
(String configName) (package private) static Type
getSuperclassTypeParameter
(Class<?> subclass) getType()
toString()
-
Field Details
-
nativeTypes
-
typeLiteralCache
-
type
-
decoderCacheKey
-
encoderCacheKey
-
nativeType
-
-
Constructor Details
-
TypeLiteral
protected TypeLiteral()Constructs a new type literal. Derives represented class from type parameter. Clients create an empty anonymous subclass. Doing so embeds the type parameter in the anonymous class's type hierarchy so we can reconstitute it at runtime despite erasure. -
TypeLiteral
-
-
Method Details