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

org.hibernate.boot.archive.scan.internal.DisabledScanner Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha1
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.boot.archive.scan.internal;

import java.util.Collections;

import org.hibernate.boot.archive.scan.spi.ClassDescriptor;
import org.hibernate.boot.archive.scan.spi.MappingFileDescriptor;
import org.hibernate.boot.archive.scan.spi.PackageDescriptor;
import org.hibernate.boot.archive.scan.spi.ScanEnvironment;
import org.hibernate.boot.archive.scan.spi.ScanOptions;
import org.hibernate.boot.archive.scan.spi.ScanParameters;
import org.hibernate.boot.archive.scan.spi.ScanResult;
import org.hibernate.boot.archive.scan.spi.Scanner;

/**
 * Implementation of Scanner that does nothing. Used for optimizing startup
 * time when metadata scanning is not needed.
 *
 * @author Petteri Pitkanen
 */
public class DisabledScanner implements Scanner {
	private static final ScanResult emptyScanResult = new ScanResultImpl(
		Collections.emptySet(),
		Collections.emptySet(),
		Collections.emptySet()
	);

	@Override
	public ScanResult scan(final ScanEnvironment environment, final ScanOptions options, final ScanParameters parameters) {
		return emptyScanResult;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy