The IP.com Prior Art Database
English (United States)
5 pages / 42.3 KB
Tooling framework for detection of Java annotations overides by deployment desciptor in Java EE domain.
Visual representation of the tooling system is following
As can be seen from the visual representation, overrides detection module (ODM) obtains information from the deployment descriptor and Java annotations and uses mapping file to determine if some data defined in the Java annotations is also defined in the deployment descriptor. If such data overlap exists, that means that corresponding information in Java annotation in overridden. This override detection can further be presented through the UI (for example warning sign in the Java editor) or through the non-ui reports.
We assume that information present in the deployment descriptor can be obtained in a form of EMF model. In turn, mapping file represents the relationships between specific Java annotations AND corresponding EMF model objects specific to certain domain.
Mapping file structure
Mapping file contains one or more AnnotationMapping elements that define the mapping between Java Annotations and corresponding EObjects in the EMF model.
This element defines the actual mapping between given annotation and certain objects in EMF model. This element has one required and one optional attribute. The required attribute is "name" and it corresponds to the name of the annotation. Optional attribute is "eFeatureName" which corresponds to the feature name of the EMF object that maps to given annotation.
element contains one or
elements that define more granular mapping of Java annotation information to EMF information
This is a required element that defines mapping specific to the given Java annotation (there can be multiple mappings that are specific to the certain Java annotation). This element must contain one
element, which roughly represents the EObject in the EMF side of mapping. Each
can have an optional attribute "eFeatureName" which, if present would signify the EObject instance corresponding to EStructural feature with this name. If this attribute is not specified, it is assumed that mapping is defined to EObject defined in the parent AnnotationMapping element.
element can have a child
(which represent child/container relationship in the EMF model) and unlimited number of
elements that roughly represent EAttribute elements in the EMF model AND define the actual mapping rules.
In general there can be 3 different types of mapping:
Java annotation attribute to EAttribute
JavaElement name (type, field, method - depending were annotation is specified) to EAttribute
Predefined hard coded value to EAttribute
The type of the mapping is defined by targetType of the
Lets consider the following example which specifies the mappings for @Stateless Java annotation from
EJB 3.0 domain