Projects / Runabout

Runabout

The Runabout is an extension of the Java libraries that adds two-argument multi-dispatch to Java without changing the language or the VM. It uses reflection to find visit methods, which are invoked using dynamically generated and loaded code. The Runabout does not need a special compiler or changes to Java's syntax. Dispatch with the Runabout is fairly fast, typically a factor of two to ten times slower than double dispatch. The Runabout is useful since it can help to make code faster and more readable. For example, a sequence of instanceof tests is a clear sign that a Runabout should be used instead.

Tags Software Development Compilers Libraries Java Libraries
Licenses GPL
Operating Systems OS Independent
Implementation Java

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  22 Oct 2005 22:11
  • Rrelease-after

Changes: This release makes the Runabout code much simpler. The goal was to make it easier for users to understand code using the Runabout by avoiding feature-bloat. The major changes are elimination of features. Specifically, there is no longer support for primitive types or user-defined dispatching functions. Supporting primitive types would interact badly with the auto (un)boxing features that are new in Java 5.0. The implementation was cleaned up to make use of the new features of Java 5.0. As a result, the new version works only with Java 5.0 or higher.

  • Rrelease-mid
  •  29 Sep 2004 23:59
  • Rrelease-after

Changes: This release fixed various bugs in the Runabout Optimizer that could lead to the generation of invalid bytecode under certain circumstances. It also fixed handing of the line number and local variable attributes.

  • Rrelease-mid
  •  03 Mar 2004 17:10
  • Rrelease-after

Changes: With this release a new tool, the Runabout Optimizer, is made available. It statically translates Java applications that use the Runabout into semantically equivalent applications where the reflective code of the Runabout is replaced with synthetic, visitor-like dispatching code. This makes the Runabout applicable in situations where dynamic loading or reflection are not possible or extraordinarily costly, e.g. when Java code is compiled ahead of time with gcj. The package name Runabout was changed to follow Java naming conventions.

  • Rrelease-mid
  •  11 Jan 2004 16:32
  • Rrelease-after

Changes: Dispatching on arrays was broken (the generated bytecode would not verify). The new version handles code generation for arrays and performs the dispatch correctly with respect to Java's array-subtyping rules.

  • Rrelease-mid
  •  22 Apr 2003 01:03
  • Rrelease-after

Changes: Ambiguous resolutions due to multiple matching interfaces are now detected and cause a run-time exception. Visits to primitive types now fall back to visit(Object) by default on the boxed values if the primitive visit methods are not redefined. Minor code cleanups were also made.

E9ba94f3eb7ee961bbabd1a4a8ccdc42_thumb

Project Spotlight

GNMS

A tool to monitor the states of network elements.

806f3574aa004ab418f40776b0207e64_thumb

Project Spotlight

Addjob

A program that lets you distribute jobs over a network.