FramedGraph { public <T extends FramedVertex> T addVertex(Class<T> kind) { T framedVertex = frameNewElement(delegate.addVertex(null), kind); framedVertex.init(); return framedVertex; } FramedGraph(Graph delegate, FrameFactory builder, TypeResolver resolver);  FramedGraph(Graph delegate); Transaction tx(); void close(); T addVertex(Class<T> kind); TVertex addVertex(); VertexTraversal<?, ?, ?> V(); EdgeTraversal<?, ?, ?> E(); VertexTraversal<?, ?, ?> v(final Collection<?> ids); VertexTraversal<?, ?, ?> v(final Object... ids); EdgeTraversal<?, ?, ?> e(final Object... ids); EdgeTraversal<?, ?, ?> e(final Collection<?> ids);  }
@Test public void testCustomFrameBuilder() { final Person o = new Person(); Graph g = new TinkerGraph(); FramedGraph fg = new FramedGraph(g, new FrameFactory() { @SuppressWarnings("unchecked") @Override public <T extends FramedElement> T create(Element e, Class<T> kind) { return (T)o; } }, TypeResolver.Java); Person person = fg.addVertex(Person.class); Assert.assertEquals(o, person); }