All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javers.core.metamodel.type.UnknownType Maven / Gradle / Ivy

There is a newer version: 7.6.2
Show newest version
package org.javers.core.metamodel.type;

import org.javers.common.exception.JaversException;
import org.javers.common.exception.JaversExceptionCode;
import org.javers.core.JaversBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Optional;

/**
 * Generic type created when a class definition for named type is missing.
 * 

* Should be avoided because Snapshots with UnknownType can't be properly deserialized, * see {@link JaversBuilder#withPackagesToScan(String)}. */ public class UnknownType extends ManagedType { public static final Logger logger = LoggerFactory.getLogger(UnknownType.class); public UnknownType(String typeName) { super(ManagedClass.unknown(), Optional.of(typeName)); logger.warn("Missing class definition with @TypeName '"+typeName+"', \n"+ "cant't properly deserialize its Snapshots from JaversRepository.\n"+ "To fix this issue provide the fully-qualified package name of the class "+ "named '"+typeName+"' in the packagesToScan property." ); } @Override ManagedType spawn(ManagedClass managedClass, Optional typeName) { throw new JaversException(JaversExceptionCode.NOT_IMPLEMENTED); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy