public interface ReadOptions
Modifier and Type | Interface and Description |
---|---|
static class |
ReadOptions.ReturnType |
Modifier and Type | Method and Description |
---|---|
void |
clearCaches() |
JsonReader.ClassFactory |
getClassFactory(Class<?> c)
Get the ClassFactory associated to the passed in class.
|
ClassLoader |
getClassLoader() |
Class<?> |
getCoercedClass(Class<?> c)
Fetch the coerced class for the passed in fully qualified class name.
|
com.cedarsoftware.util.convert.ConverterOptions |
getConverterOptions() |
Object |
getCustomOption(String key)
Get a custom option
|
JsonReader.JsonClassReader |
getCustomReader(Class<?> c)
Fetch the custom reader for the passed in Class.
|
Map<String,Field> |
getDeepDeclaredFields(Class<?> c)
Gets the declared fields for the full class hierarchy of a given class
|
Map<String,Injector> |
getDeepInjectorMap(Class<?> classToTraverse) |
int |
getMaxDepth() |
JsonReader.MissingFieldHandler |
getMissingFieldHandler() |
String |
getTypeNameAlias(String typeName)
Alias Type Names, e.g.
|
Class<?> |
getUnknownTypeClass() |
boolean |
isAllowNanAndInfinity() |
boolean |
isClassCoerced(String className) |
boolean |
isCloseStream() |
boolean |
isCustomReaderClass(Class<?> clazz) |
boolean |
isFailOnUnknownType() |
boolean |
isNonReferenceableClass(Class<?> clazz) |
boolean |
isNotCustomReaderClass(Class<?> clazz) |
boolean |
isReturningJavaObjects() |
boolean |
isReturningJsonObjects() |
boolean isAllowNanAndInfinity()
ClassLoader getClassLoader()
boolean isFailOnUnknownType()
Class<?> getUnknownTypeClass()
boolean isCloseStream()
int getMaxDepth()
String getTypeNameAlias(String typeName)
typeName
- String name of type to fetch alias for. There are no default aliases.boolean isClassCoerced(String className)
Class<?> getCoercedClass(Class<?> c)
c
- Class to coerceJsonReader.MissingFieldHandler getMissingFieldHandler()
boolean isNonReferenceableClass(Class<?> clazz)
clazz
- Class to check to see if it is non-referenceable. Non-referenceable classes will always create
a new instance when read in and never use @id/@ref. This uses more memory when the JSON is read in,
as there will be a separate instance in memory for each occurrence. There are certain classes that
json-io automatically treats as non-referenceable, like Strings, Enums, Class, and any Number
instance (BigDecimal, AtomicLong, etc.) You can add to this list. Often, non-referenceable classes
are useful for classes that can be defined in one line as a JSON, like a LocalDateTime, for example.boolean isNotCustomReaderClass(Class<?> clazz)
clazz
- Class to see if it is on the not-customized list. Classes are added to this list when
a class is being picked up through inheritance, and you don't want it to have a custom
reader associated to it.boolean isCustomReaderClass(Class<?> clazz)
clazz
- Class to check to see if there is a custom reader associated to it.JsonReader.ClassFactory getClassFactory(Class<?> c)
c
- Class for which to fetch the ClassFactory.JsonReader.JsonClassReader getCustomReader(Class<?> c)
c
- Class of object for which fetch a custom readerboolean isReturningJsonObjects()
boolean isReturningJavaObjects()
void clearCaches()
Map<String,Field> getDeepDeclaredFields(Class<?> c)
c
- - given class.com.cedarsoftware.util.convert.ConverterOptions getConverterOptions()
Copyright © 2024. All rights reserved.