JMantlet is an Eclipse plug-in to manage and enforce concern interfaces in Java programs.
In particular, JMantlet can be useful to enforce the use of standard Java
APIs and manage references to vendor-specific classes.
Motivation behind JMantlet
Programming Languages support separation of concerns
and information hiding
in a number of ways: abstract data types, object encapsulation, application programming interfaces (APIs), modules,
packages, etc... These mechanisms provide a stable interface that hides a concern's implementation from the
rest of the program and allows the implementation of a concern to evolve without directly affecting the rest of the
program that interacts with that concern. A problem with information hiding is that providing a stable interface behind
which to hide implementation details involves fixing in advance the services offered through the interface. However, often
the services offered by an interface in one context are not sufficient or appropriate in another context.
In such cases, developers are faced with the decision of either complying with the interface (possibly giving up on
a service), or accessing the implementation (which introduces coupling and may lead to maintenance problems). Design
idioms, such as interface segregation, can help mitigate this problem, but have limitations of their own.
JMantlet is a tool-based approach to information hiding that allows to manage concern interfaces.
Using JMantlet
JMantlet is a tool to manage and enforce concern interfaces in a program.
The developer must first declare the classes that are part of
the interface and the classes that are part of the implementation of each concern of a program.
The concern are declared using a simple XML format in a concern configuration file that can later be
loaded in the JMantlet plug-in. JMantlet will generate a model of the concerns in the Concern
Model Viewer, from which it
will enforce the use the concern interfaces and restrict the access to concern
implementations. If a class of a concern's implementation is referenced outside the scope of that
concern, JMantlet will generate an error marker (i.e. like a compilation error) at the location of the
reference. JMantlet also indicates the level of coupling between concern interfaces classes and their
implementation.
System requirements: Eclipse 3.1, Java 1.4.
JMantlet has been tested on Windows and Linux.
To install JMantlet:
From the Eclipse menu bar, select Help | Software
Updates | Find and Install...
Select "Search for new features to install" and click
Next >
Click on the New Remote Site... button.
For the name, enter "JMantlet". For the
URL, enter "http://www.cs.mcgill.ca/~jboula2/jmantlet", and click
OK
Select the new JMantlet entry in the list
and click Finish
In the list of features to install, select the root node
of the JMantlet tree, and click Next >
Select that you accept the terms of the license agreement,
and click Next >
Click Finish, and then Install
Restart your workspace.
You should now have the JMantlet plug-in installed. A new JMantlet button
should appear in your task bar as well as a JMantlet Checker menu. To
get started:
Open the Concern Model Viewer.
Select Window | Show View | Other.
Under the JMantlet folder, select Concern Model
Viewer and click Ok. The JMantlet Concern View will appear.
To update an existing installation of JMantlet:
Make sure that your version of Eclipse allows compatible
updates. Select Window | Preferences |
Install/Update and make sure the compatible
radio button is selected under Valid updates.
Select Help | Software Updates | Manage
Configuration
Select the JMantlet feature.
Click on Scan for Updates, and go through the motions.
To obtain the source code of JMantlet:
The JMantlet source code is included with the plug-in.
To obtain the source code:
Install JMantlet as directed above.
Find the directory named ca.mcgill.cs.serg.jmantlet_...
in the plugin directory of your Eclipse
installation.