use of org.mybatis.generator.api.dom.java.FullyQualifiedJavaType in project generator by mybatis.
the class MapperAnnotationPlugin method clientGenerated.
@Override
public boolean clientGenerated(Interface interfaze, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Mapper"));
interfaze.addAnnotation("@Mapper");
return true;
}
use of org.mybatis.generator.api.dom.java.FullyQualifiedJavaType in project generator by mybatis.
the class FullyQualifiedJavaTypeTest method testStringArray.
@Test
public void testStringArray() {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("java.lang.String[]");
assertFalse(fqjt.isPrimitive());
assertTrue(fqjt.isArray());
}
use of org.mybatis.generator.api.dom.java.FullyQualifiedJavaType in project generator by mybatis.
the class FullyQualifiedJavaTypeTest method testSimpleType2.
@Test
public void testSimpleType2() {
FullyQualifiedJavaType fqjt = //$NON-NLS-1$
new FullyQualifiedJavaType("com.foo.bar");
assertTrue(fqjt.isExplicitlyImported());
//$NON-NLS-1$
assertEquals("bar", fqjt.getShortName());
//$NON-NLS-1$
assertEquals("com.foo.bar", fqjt.getFullyQualifiedName());
//$NON-NLS-1$
assertEquals("com.foo", fqjt.getPackageName());
assertEquals(1, fqjt.getImportList().size());
assertEquals("com.foo.bar", fqjt.getImportList().get(0));
}
use of org.mybatis.generator.api.dom.java.FullyQualifiedJavaType in project generator by mybatis.
the class FullyQualifiedJavaTypeTest method testByteArray2.
@Test
public void testByteArray2() {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("byte[ ]");
assertFalse(fqjt.isPrimitive());
assertTrue(fqjt.isArray());
}
use of org.mybatis.generator.api.dom.java.FullyQualifiedJavaType in project generator by mybatis.
the class FullyQualifiedJavaTypeTest method testWildcardType1.
@Test
public void testWildcardType1() {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("java.util.Map<java.lang.String, ? extends com.foo.Bar>");
assertTrue(fqjt.isExplicitlyImported());
//$NON-NLS-1$
assertEquals("Map<String, ? extends Bar>", fqjt.getShortName());
//$NON-NLS-1$
assertEquals("java.util.Map<java.lang.String, ? extends com.foo.Bar>", fqjt.getFullyQualifiedName());
//$NON-NLS-1$
assertEquals("java.util", fqjt.getPackageName());
assertEquals(2, fqjt.getImportList().size());
//$NON-NLS-1$
assertEquals("java.util.Map", fqjt.getFullyQualifiedNameWithoutTypeParameters());
}
Aggregations