JavaSketch is an Eclipse-based tool for discovering chains of Java API calls that can be composed to produce a desired result. It is useful when you want to obtain a particular object or call some method on an object whose type you don't know. JavaSketch frees you from the tedium of manually searching APIs in order to find the intermediary objects, method calls, and static helper functions that you need to use in order to achieve your goal. It only needs to be provided with the object references you already have (can be inferred from the position in the active Java editor) and some hints about what you're looking for (such as the resulting type).

Java Sketch is being developed by Liviu Tancau as part of his Master's dissertation at UC Berkeley. It builds upon earlier work by Dave Mandelin (see Prospector).

The project is now in beta stage. To try it out, see the installation instructions.
The latest version is 0.9.5 released on 4/23/07 (changelog). Requires Eclipse 3.2+ and Java 1.5+


  • JDT integration (content assist, source lookup, code generation)
  • Search for call chains that yield a certain type or that call certain methods (can use patterns)
  • Constrain search with restrictions on types, packages, calls, and constructors
  • Use simple patterns or regular expressions in place of type or method names
  • Query builder for [new] users unfamiliar with the query language
  • Include or exclude internal and deprecated APIs
  • Configurable search depth; ability to search in background
  • Proposals sorted by relevance using a modified PageRank algorithm
  • View the source of suggested API calls [if source is available]
  • Generate code as a one-line expression, multiple assignments, or new helper method
  • Preview code generation
    Also check out the screenshots and wiki

    (c) 2006-2007 Liviu Tancau