/** * Create a type. * Creates a type that can be used to create objects. * @param name The type name. * @param supertype The supertype. * @return The type. */ public OAVObjectType createType(String name, OAVObjectType supertype) { OAVObjectType type = new OAVObjectType(name, supertype, this); if(contains(type)) throw new RuntimeException("Type already exists: "+name); types.put(name, type); return type; }
/** * Create a type. * Creates a type that can be used to create objects. * @param name The type name. * @param supertype The supertype. * @return The type. */ public OAVObjectType createType(String name, OAVObjectType supertype) { OAVObjectType type = new OAVObjectType(name, supertype, this); if(contains(type)) throw new RuntimeException("Type already exists: "+name); types.put(name, type); return type; }