public class RefractorMap extends java.util.HashMap<java.lang.Class<?>,java.lang.Class<? extends Refractor>>
Refractor
implementations. The initializer will define a default mapping, which can be
overridden or extended by putting new entries into the map.Modifier and Type | Field and Description |
---|---|
static java.util.HashMap<java.lang.Class<?>,java.lang.Class<? extends Refractor>> |
DEFAULT_MAPPING |
Constructor and Description |
---|
RefractorMap()
Initializes the instance with the default mapping.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<? extends Refractor> |
getRefractorFor(java.lang.Class<?> cls)
Gets the default refractor class for the specified data class.
|
java.lang.String |
getSQLiteColumnTypeFor(java.lang.Class<?> cls)
Discovers the SQLite column type for a given class, by calling the
class's refractor.
|
RefractorMap |
init()
Wipes out all current entries and restores the default mapping.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public static java.util.HashMap<java.lang.Class<?>,java.lang.Class<? extends Refractor>> DEFAULT_MAPPING
public RefractorMap()
public static java.lang.Class<? extends Refractor> getRefractorFor(java.lang.Class<?> cls)
cls
- the data classpublic RefractorMap init()
public java.lang.String getSQLiteColumnTypeFor(java.lang.Class<?> cls) throws IntrospectionException
cls
- the class to be refractedIntrospectionException
- if the refractor can't be instantiated