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.
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