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.NativeTypestatic Map<Type, TypeLiteral.NativeType> (package private) final Typeprivate static Map<Type, TypeLiteral> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a new type literal.TypeLiteral(Type type, String decoderCacheKey, String encoderCacheKey) -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeLiteralprivate static TypeLiteralprivate static Stringprivate static StringgenerateCacheKey(Type type, String prefix) private static StringgenerateDecoderCacheKey(Type type) private static StringgenerateEncoderCacheKey(Type type) getDecoderCacheKey(String configName) getEncoderCacheKey(String configName) (package private) static TypegetSuperclassTypeParameter(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
-
generateDecoderCacheKey
-
generateEncoderCacheKey
-
generateCacheKey
-
formatTypeWithoutSpecialCharacter
-
getSuperclassTypeParameter
-
create
-
createNew
-
getType
-
getDecoderCacheKey
-
getDecoderCacheKey
-
getEncoderCacheKey
-
getEncoderCacheKey
-
getNativeType
-
toString
-