Skip to content

Instantly share code, notes, and snippets.

@tomgibara
Created January 12, 2010 22:46
Show Gist options
  • Save tomgibara/275703 to your computer and use it in GitHub Desktop.
Save tomgibara/275703 to your computer and use it in GitHub Desktop.
//create a factory that creates types within a scope
StuppScope scope = new StuppScope();
StuppType type = StuppType.getInstance(Book.class);
StuppFactory<Book, Long> factory = new StuppFactory(type, scope);
//then use it to create objects
Book book = factory.newInstance(1L);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment