use of org.mybatis.generator.api.dom.java.Interface in project generator by mybatis.
the class GeneratedJavaFileTest method testGenericInterface.
@Test
public void testGenericInterface() {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("org.mybatis.test.TestInterface");
fqjt.addTypeArgument(new FullyQualifiedJavaType("T"));
Interface ifc = new Interface(fqjt);
JavaFormatter jf = new DefaultJavaFormatter();
GeneratedJavaFile gjf = new GeneratedJavaFile(ifc, "src", jf);
assertEquals("TestInterface.java", gjf.getFileName());
assertEquals("org.mybatis.test", gjf.getTargetPackage());
}
use of org.mybatis.generator.api.dom.java.Interface in project generator by mybatis.
the class GeneratedJavaFileTest method testReqularInterface.
@Test
public void testReqularInterface() {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("org.mybatis.test.TestInterface");
Interface ifc = new Interface(fqjt);
JavaFormatter jf = new DefaultJavaFormatter();
GeneratedJavaFile gjf = new GeneratedJavaFile(ifc, "src", jf);
assertEquals("TestInterface.java", gjf.getFileName());
assertEquals("org.mybatis.test", gjf.getTargetPackage());
}
use of org.mybatis.generator.api.dom.java.Interface in project generator by mybatis.
the class SimpleInterfaceGenerator method generateInterface.
private Interface generateInterface() {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(BASE_PACKAGE + ".sub1.SimpleInterface");
Interface interfaze = new Interface(fqjt);
interfaze.setVisibility(JavaVisibility.PUBLIC);
return interfaze;
}
Aggregations