ClassNameBuilder extends IdentifierBuilder { public ClassName className(ResourceObject resource, OntGenerationConfig config) throws RepositoryException { return ClassName.get(packageName(resource, config), capitalizedIdentifier(resource, config)); } private  ClassNameBuilder(ObjectConnection connection); static ClassNameBuilder forObjectRepository(ObjectRepository repository); static ClassNameBuilder forObjectRepository(ObjectConnection connection); ClassName className(ResourceObject resource, OntGenerationConfig config); TypeSpec interfaceSpec(ResourceObject resource, OntGenerationConfig config);  }
@Test public void className() throws Exception { ClassName cn = ClassNameBuilder.forObjectRepository(anno4j.getObjectRepository()) .className(person, config); assertEquals("com.example", cn.packageName()); assertEquals("MyPerson", cn.simpleName()); }