Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public AntProgressCallback(Task task, boolean verbose) {
this.verbose = verbose;
}

/* (non-Javadoc)
/*
* (non-Javadoc)
* @see org.mybatis.generator.internal.NullProgressCallback#startTask(java.lang.String)
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
* subsequent plugin is called.
*
* @author Jeff Butler
*
*/
public abstract class CompositePlugin implements Plugin {
private final List<Plugin> plugins = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public interface ConnectionFactory {
* The generator will close the connection.
*
* @return the connection
* @throws SQLException if there is some error obtaining the connection
*
* @throws SQLException
* if there is some error obtaining the connection
*/
Connection getConnection() throws SQLException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public String getTargetProject() {
*/
public abstract String getTargetPackage();

/* (non-Javadoc)
/*
* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
* the actual code generation methods left unimplemented.
*
* @author Jeff Butler
*
*/
public abstract class IntrospectedTable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* be passed into the class through the use of properties in the Context.
*
* @author Jeff Butler
*
*/
public interface JavaFormatter {
void setContext(Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* be passed into the class through the use of properties in the Context.
*
* @author Jeff Butler
*
*/
public interface KotlinFormatter {
void setContext(Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

/**
* This class is the main interface to MyBatis generator. A typical execution of the tool involves these steps:
*
* <ol>
* <li>Create a Configuration object. The Configuration can be the result of a parsing the XML configuration file, or it
* can be created solely in Java.</li>
Expand All @@ -51,11 +50,13 @@
* </ol>
*
* @author Jeff Butler
*
* @see org.mybatis.generator.config.xml.ConfigurationParser
*/
public class MyBatisGenerator {

private static final ProgressCallback NULL_PROGRESS_CALLBACK = new ProgressCallback() {};
private static final ProgressCallback NULL_PROGRESS_CALLBACK = new ProgressCallback() {
};

private final Configuration configuration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
* implementations, these methods may not be called.
*
* @author Jeff Butler
* @see PluginAdapter
*
* @see PluginAdapter
*/
public interface Plugin {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
* must perform validation.
*
* @author Jeff Butler
*
*/
public abstract class PluginAdapter implements Plugin {
protected Context context;
protected final Properties properties = new Properties();

protected PluginAdapter() {}
protected PluginAdapter() {
}

@Override
public void setContext(Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public interface ShellCallback {
* the target project
* @param targetPackage
* the target package
*
* @return the directory (must exist)
*
* @throws ShellException
* if the project/package cannot be resolved into a directory on the file system. In this case, the
* generator will not save the file it is currently working on. The generator will add the exception
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* A slightly more verbose progress callback.
*
* @author Jeff Butler
*
*/
public class VerboseProgressCallback implements ProgressCallback {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* be passed into the class through the use of properties in the Context.
*
* @author Jeff Butler
*
*/
public interface XmlFormatter {
void setContext(Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
import org.mybatis.generator.config.Context;

/**
* This class is the default formatter for generated Java. This class will use the
* built in DOM renderers.
* This class is the default formatter for generated Java. This class will use the built in DOM renderers.
*
* @author Jeff Butler
*
*/
public class DefaultJavaFormatter implements JavaFormatter, CompilationUnitVisitor<String> {
protected Context context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
import org.mybatis.generator.config.Context;

/**
* This class is the default formatter for generated Kotlin. This class will use the
* built in DOM renderers.
* This class is the default formatter for generated Kotlin. This class will use the built in DOM renderers.
*
* @author Jeff Butler
*
*/
public class DefaultKotlinFormatter implements KotlinFormatter {
protected Context context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
import org.mybatis.generator.config.Context;

/**
* This class is the default formatter for generated XML. This class will use the
* built in document renderer.
* This class is the default formatter for generated XML. This class will use the built in document renderer.
*
* @author Jeff Butler
*
*/
public class DefaultXmlFormatter implements XmlFormatter {
protected Context context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
import java.util.List;
import java.util.StringTokenizer;

public class FullyQualifiedJavaType implements
Comparable<FullyQualifiedJavaType> {
public class FullyQualifiedJavaType implements Comparable<FullyQualifiedJavaType> {

private static final String JAVA_LANG = "java.lang"; //$NON-NLS-1$

Expand Down Expand Up @@ -335,11 +334,11 @@ private void parse(String fullTypeSpecification) {
if (spec.startsWith("extends ")) { //$NON-NLS-1$
boundedWildcard = true;
extendsBoundedWildcard = true;
spec = spec.substring(8); // "extends ".length()
spec = spec.substring(8); // "extends ".length()
} else if (spec.startsWith("super ")) { //$NON-NLS-1$
boundedWildcard = true;
extendsBoundedWildcard = false;
spec = spec.substring(6); // "super ".length()
spec = spec.substring(6); // "super ".length()
} else {
boundedWildcard = false;
}
Expand All @@ -359,8 +358,8 @@ private void parse(String fullTypeSpecification) {
}

// this is far from a perfect test for detecting arrays, but is close
// enough for most cases. It will not detect an improperly specified
// array type like byte], but it will detect byte[] and byte[ ]
// enough for most cases. It will not detect an improperly specified
// array type like byte], but it will detect byte[] and byte[ ]
// which are both valid
isArray = fullTypeSpecification.endsWith("]"); //$NON-NLS-1$
}
Expand Down Expand Up @@ -478,6 +477,7 @@ private void genericParse(String genericSpecification) {
*
* @param baseQualifiedName
* the base qualified name
*
* @return the package
*/
private static String getPackage(String baseQualifiedName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
import java.util.Optional;

/**
* This class encapsulates the idea of an inner class - it has methods that make
* it easy to generate inner classes.
* This class encapsulates the idea of an inner class - it has methods that make it easy to generate inner classes.
*
* @author Jeff Butler
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import java.util.List;

/**
* This class encapsulates the idea of an inner enum - it has methods that make
* it easy to generate inner enum.
* This class encapsulates the idea of an inner enum - it has methods that make it easy to generate inner enum.
*
* @author Jeff Butler
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@
import java.util.stream.Collectors;

public class JavaDomUtils {
private JavaDomUtils() {}
private JavaDomUtils() {
}

/**
* Calculates type names for writing into generated Java. We try to
* use short names wherever possible. If the type requires an import,
* but has not been imported, then we need to use the fully qualified
* type name.
* Calculates type names for writing into generated Java. We try to use short names wherever possible. If the type
* requires an import, but has not been imported, then we need to use the fully qualified type name.
*
* @param compilationUnit
* the compilation unit being written
* @param fqjt
* the type in question
*
* @param compilationUnit the compilation unit being written
* @param fqjt the type in question
* @return the full type name
*/
public static String calculateTypeName(CompilationUnit compilationUnit, FullyQualifiedJavaType fqjt) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* This class contains a list of Java reserved words.
*
* @author Jeff Butler
*
*/
public class JavaReservedWords {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
import org.mybatis.generator.internal.util.CustomCollectors;

public class RenderingUtilities {
private RenderingUtilities() {}
private RenderingUtilities() {
}

public static final String JAVA_INDENT = " "; //$NON-NLS-1$
private static final TypeParameterRenderer typeParameterRenderer = new TypeParameterRenderer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
* classes as those Java types have replacements in Kotlin.
*
* @author Jeff Butler
*
*/
public class JavaToKotlinTypeConverter {
private JavaToKotlinTypeConverter() {}
private JavaToKotlinTypeConverter() {
}

private static final Map<String, String> typeMap = new HashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public static Builder newObject(String name) {
public static Builder newCompanionObject() {
return new Builder(Type.COMPANION_OBJECT, DEFAULT_COMPANION_OBJECT_NAME);
}

public static Builder newCompanionObject(String name) {
return new Builder(Type.COMPANION_OBJECT, name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

public class KotlinRenderingUtilities {

private KotlinRenderingUtilities() {}
private KotlinRenderingUtilities() {
}

public static final String KOTLIN_INDENT = " "; //$NON-NLS-1$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* annotations does not need matching XML.
*
* @author Jeff Butler
*
*/
public abstract class AbstractJavaClientGenerator extends AbstractJavaGenerator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public String getProject() {
return project;
}

public List<KotlinFile> listOf(KotlinFile...kotlinFiles) {
public List<KotlinFile> listOf(KotlinFile... kotlinFiles) {
return Arrays.asList(kotlinFiles);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

/**
* Holds information about a class (uses the JavaBeans Introspector to find properties).
* @author Jeff Butler
*
* @author Jeff Butler
*/
public class RootClassInfo {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@
import org.mybatis.generator.internal.ObjectFactory;

/**
* Introspected table implementation for generating simple MyBatis3 artifacts (no "by example" methods,
* flat model, etc.)
* Introspected table implementation for generating simple MyBatis3 artifacts (no "by example" methods, flat model,
* etc.)
*
* @author Jeff Butler
*
*/
public class IntrospectedTableMyBatis3SimpleImpl extends IntrospectedTableMyBatis3Impl {
public IntrospectedTableMyBatis3SimpleImpl() {
super();
}

@Override
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator,
List<String> warnings,
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator, List<String> warnings,
ProgressCallback progressCallback) {
if (javaClientGenerator == null) {
if (context.getSqlMapGeneratorConfiguration() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* <p>If a column is identity, it should not be referenced on an insert method.
*
* @author Jeff Butler
*
*/
public class ListUtilities {

Expand Down
Loading