@Override public CompositeType getFirstDeployed() { return firstDeployed == null ? CompositeTypeImpl.getRootCompositeType() : firstDeployed; }
public void testCompositeType() { CompositeTypeImpl type = new CompositeTypeImpl((CompositeType) null, SchemaNames.BUILTIN, "composite type", null); assertTrue(type.isCompositeType()); assertEquals("composite type", type.getName()); assertFalse(type.isSimpleType()); // XXX: Not is CompositeType API. Why? // assertFalse(type.isPrimitive()); assertFalse(type.isComplexType()); assertFalse(type.isAnyType()); assertNull(type.getSuperType()); // Author schemas API assertFalse(type.hasSchemas()); assertFalse(type.hasSchema("inexisting schema")); assertTrue(type.getSchemas().isEmpty()); // Author fields API assertTrue(type.getFields().isEmpty()); }