Type extends ModelBase { public final boolean isOfType(String classOrInterfaceName) { String qualifiedClassOrInterfaceName; if (!isQualifiedName(classOrInterfaceName)) { if (NamesUtil.isJavaLangClassName(classOrInterfaceName)) qualifiedClassOrInterfaceName=ensureQualifedName(classOrInterfaceName, "java.lang"); else if (NamesUtil.isJavaUtilClassName(classOrInterfaceName)) qualifiedClassOrInterfaceName=ensureQualifedName(classOrInterfaceName, "java.util"); else qualifiedClassOrInterfaceName=ensureQualifedName(classOrInterfaceName, this.getGeneratedClazz().getPackageName()); } else qualifiedClassOrInterfaceName=classOrInterfaceName; return isOfQualifiedType(qualifiedClassOrInterfaceName); } protected  Type(BasicClazz optClazzUsingType, String qualifiedProtoTypicalTypeName); abstract Type copy(BasicClazz optClazzUsingType); @Override Configuration getConfiguration(); @Override BasicClazz getClazz(); @Override String getPackageName(); String getQualifiedName(); String getPrototypicalQualifiedName(); abstract boolean isInImportScope(); String getName(); String getSimpleName(); String getPrototypicalName(); String getWrapperName(); boolean isRootObject(); boolean isPrimitive(); boolean isVoid(); boolean isPrimitiveByte(); boolean isPrimitiveBoolean(); boolean isPrimitiveChar(); boolean isPrimitiveShort(); boolean isPrimitiveInt(); boolean isPrimitiveLong(); boolean isPrimitiveFloat(); boolean isPrimitiveDouble(); boolean isArray(); boolean isObject(); boolean isMultiDimensionalArray(); DetailLevel getDetailLevel(); boolean canBeMoreDetailed(); boolean isCollection(); boolean isThisType(); boolean isThisSuperType(); abstract TypeCategory getTypeCategory(); final boolean isExactType(String classOrInterfaceName); final boolean isExactType(Class<?> _class); final boolean isExactQualifiedType(String qualifiedClassOrInterfaceName); final boolean isOfType(String classOrInterfaceName); final boolean isOfType(Class<?> _class); boolean isOfQualifiedType(String qualifiedClassOrInterfaceName); boolean hasStaticMethod(String overloadName); boolean hasInstanceMethod(String overloadName); boolean hasStaticMember(String name); boolean hasInstanceMember(String name); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testIsOfType() { Type type = new TestType("java.util.Locale"); Assert.assertTrue(type.isOfType("java.util.Locale")); Assert.assertTrue(type.isOfType("java.lang.Cloneable")); Assert.assertTrue(type.isOfType("java.io.Serializable")); Assert.assertTrue(type.isOfType("java.lang.Object")); }
@Test public void testNotOfType() { Type type = new TestType("java.util.Locale"); Assert.assertFalse(type.isOfType("java.util.Collection")); }