IRC - Implementation Restriction Checker
The work on IRC is discontinued; we are currently working on the successor Magellan. Please, visit the Magellan website for further information.
IRC (Implementation Restriction Checker) is a flexible framework to enforce implementation restrictions, for example the EJB programming restrictions or programming idioms. IRC is described in the following paper.
The Framework
An implementation restriction is a constraint on the structural or behavioral aspect of an implementation. On the one hand, implementation restrictions are simply a technical necessity. On the other hand, they can be part of a specification to restrict the freedom of classes implemented according to a specification. A third kind of implementation restrictions are the usage of design patterns and best practices, a development team has committed to. The IRC Framework allows you to enforce these kinds of implementation restrictions.
It consists of the following participants:
- IRCManager: Manages the registration and deregistration of checker instances and controls the checking process.
- IRC: The main interface of every restriction checker. It declares only one method: "
check(ClassFile classFile)", whereClassFileis a BAT interface to represent a Java class file. - IRStatus: An identified issue in a class file. An IRStatus defines the
classFilewhich caused this status, the severity, the broken restriction and a describing text. Further, anIRLocationinstance that encapsulates the location corresponding to the status is available. - IRLocation: Represents the origin of an
IRStatus. A location can be theclassFileitself, the class definition, a method, a field or a line number of the corresponding source code. To create specific instances theIRLocationclass defines several factory methods. - IRException: A simple subclass of
java.lang.Exception, which is thrown if a checker can't check aclassFile.
A typical application flow looks like this:

- Step 1: The client creates an
IRManagerwith a reference to a BAT repository. - Step 2 and 3: After this, the checker registers
IRCinstances that will check the implementation restrictions. - Step 4: After setup, the client can check class files by invoking the corresponding method of the manager. The manager will return a list of
IRStatusobjects, representing informational messages, warnings or broken restrictions.
The Plug-in
In addition to the core framework, we also developed a plug-in for the Eclipse IDE. In the following Screenshot you see an error detected by an implementation restriction checker.
Download
Since IRC is discontinued, a download is no longer made available. Please visit the Magellan webpage for information about the successor.

