private boolean shouldUseShortName(Generator gen, Type type) {
        requireNonNulls(gen, type);
        
        final DependencyManager mgr = gen.getDependencyMgr();
        final String name = Formatting.stripGenerics(type.getTypeName().replace('$', '.'));
        
        if (mgr.isIgnored(name)) {
            return true;
        }
        
        if (mgr.isLoaded(name)) {
            return true;
        }
        
        final Optional<String> current = mgr.getCurrentPackage();
		return current.isPresent() && name.startsWith(current.get());
	}
Returns whether or not to use the short name for the type.

@param gen   the generator
@param type  the type
@return      {@code true} if the short name should be used.
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/java/view/TypeView.java