Package org.apache.johnzon.mapper
Class Mappings
- java.lang.Object
-
- org.apache.johnzon.mapper.Mappings
-
- Direct Known Subclasses:
JsonbMappings
public class Mappings extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Mappings.ClassMapping
static class
Mappings.CollectionMapping
private static class
Mappings.CompositeReader
private static class
Mappings.CompositeWriter
static class
Mappings.Getter
private static class
Mappings.MapBuilderReader
private static class
Mappings.MapUnwrapperWriter
static class
Mappings.Setter
-
Field Summary
Fields Modifier and Type Field Description protected ConcurrentMap<Type,Mappings.ClassMapping>
classes
protected ConcurrentMap<Type,Mappings.CollectionMapping>
collections
protected MapperConfig
config
private static JohnzonParameterizedType
VIRTUAL_TYPE
-
Constructor Summary
Constructors Constructor Description Mappings(MapperConfig config)
-
Method Summary
-
-
-
Field Detail
-
VIRTUAL_TYPE
private static final JohnzonParameterizedType VIRTUAL_TYPE
-
classes
protected final ConcurrentMap<Type,Mappings.ClassMapping> classes
-
collections
protected final ConcurrentMap<Type,Mappings.CollectionMapping> collections
-
config
protected final MapperConfig config
-
-
Constructor Detail
-
Mappings
public Mappings(MapperConfig config)
-
-
Method Detail
-
findCollectionMapping
public Mappings.CollectionMapping findCollectionMapping(ParameterizedType genericType, Type enclosingType)
-
createCollectionMapping
private <T> Mappings.CollectionMapping createCollectionMapping(ParameterizedType aType, Type root)
-
isPrimitive
public static boolean isPrimitive(Type type)
-
getClassMapping
public Mappings.ClassMapping getClassMapping(Type clazz)
-
findOrCreateClassMapping
public Mappings.ClassMapping findOrCreateClassMapping(Type clazz)
-
doFindOrCreateClassMapping
private Mappings.ClassMapping doFindOrCreateClassMapping(Type clazz, Map<Type,Type> args, boolean noPutForClass)
-
putOrGetClassMapping
private Mappings.ClassMapping putOrGetClassMapping(Type clazz, Mappings.ClassMapping classMapping)
-
createClassMapping
protected Mappings.ClassMapping createClassMapping(Class<?> inClazz, Map<Type,Type> resolvedTypes)
-
addSetterIfNeeded
private void addSetterIfNeeded(Map<String,Mappings.Setter> setters, String key, AccessMode.Writer value, boolean copyDate, Class<?> rootClass, Map<Type,Type> resolvedTypes)
-
lookupType
private Type lookupType(AccessMode.DecoratedType value, Map<Type,Type> resolvedTypes)
-
addGetterIfNeeded
private void addGetterIfNeeded(Map<String,Mappings.Getter> getters, String key, AccessMode.Reader value, boolean copyDate, Map<Type,Type> resolvedTypes)
-
handleVirtualObject
private void handleVirtualObject(Collection<String> virtualFields, JohnzonVirtualObject o, Map<String,Mappings.Getter> getters, Map<String,Mappings.Setter> setters, Map<String,AccessMode.Reader> readers, Map<String,AccessMode.Writer> writers, boolean copyDate, Class<?> rootClazz)
-
findConverter
private MapperConverter findConverter(boolean copyDate, AccessMode.DecoratedType decoratedType)
-
isBuiltInJohnzonConverter
private boolean isBuiltInJohnzonConverter(Converter<?> converter)
-
-