Cleaned code

This commit is contained in:
Luca Frosini 2020-07-02 19:06:37 +02:00
parent 16c26ad39f
commit 1376643817
1 changed files with 1 additions and 15 deletions

View File

@ -48,9 +48,7 @@ public abstract class ElementMapper {
protected static final ObjectMapper mapper;
protected static final Map<String, Class<? extends Element>> knownTypes;
// // protected static final Map<Class<? extends Element>, Class<? extends ElementImpl>> interfaceToImplementation;
// protected static final Map<String, Class<? extends ElementImpl>> nameToImplementation;
//
/**
* @return the ObjectMapper
*/
@ -62,18 +60,13 @@ public abstract class ElementMapper {
mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
knownTypes = new HashMap<>();
//interfaceToImplementation = new HashMap<>();
// nameToImplementation = new HashMap<>();
List<Package> packages = new ArrayList<Package>();
/*
Class<Type> tdClz = Type.class;
ElementMapper.registerSubtypes(tdClz);
packages.add(tdClz.getPackage());
*/
AccessType[] accessTypes = AccessType.values();
for(AccessType accessType : accessTypes) {
@ -130,13 +123,6 @@ public abstract class ElementMapper {
public static <El extends Element> void registerSubtypes(Class<El> clz) {
String typeName = TypeMapper.getType(clz);
knownTypes.put(typeName, clz);
// if(clz.isAnnotationPresent(JsonDeserialize.class)) {
// JsonDeserialize jsonDeserialize = clz.getAnnotation(JsonDeserialize.class);
// Class<? extends ElementImpl> impl = (Class<? extends ElementImpl>) jsonDeserialize.as();
// nameToImplementation.put(typeName, impl);
// }
mapper.registerSubtypes(clz);
}