org.hibernate.tool.schema.internal.exec.ScriptSourceInputFromReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* 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.tool.schema.internal.exec;
import java.io.Reader;
import org.hibernate.tool.schema.spi.ScriptSourceInput;
/**
* ScriptSourceInput implementation for explicitly given Readers. The readers are not released by this class.
*
* @author Steve Ebersole
*/
public class ScriptSourceInputFromReader extends AbstractScriptSourceInput implements ScriptSourceInput {
private final Reader reader;
/**
* Constructs a ScriptSourceInputFromReader
*
* @param reader The reader to read from
*/
public ScriptSourceInputFromReader(Reader reader) {
this.reader = reader;
}
@Override
protected Reader reader() {
return reader;
}
@Override
protected String getScriptDescription() {
return "[injected ScriptSourceInputFromReader script]";
}
@Override
public String toString() {
return "ScriptSourceInputFromReader()";
}
}