public class InterfaceBuilder extends AbstractBuilder
Interfaces in the SAMM instance based on reverse engineered
code| Modifier and Type | Field and Description |
|---|---|
static boolean |
PROVIDED_INTERFACE
Constant indicating the case of a provided interface.
|
| Constructor and Description |
|---|
InterfaceBuilder(Root gastModel,
SoMoXConfiguration configuration,
AnalysisResult result)
Constructor of this interface builder
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProvidedInterfaces(ComponentImplementingClassesLink componentCandidate)
Create provided roles and their interfaces if they do not exist for the given component
|
boolean |
findAndAddRequiredInterfaces(ComponentImplementingClassesLink componentCandidate)
Method used to find for a given component the set of required interfaces.
|
void |
removeInterfaceSelfAccesses(ComponentImplementingClassesLink primitiveComponent)
Removes duplicate component interfaces which are provided AND required.
|
void |
reverseEngineerRemainingInterfacesAsFreeFloatingInterfaces(AnalysisResult analysisResult,
Root gastModel)
Adds interfaces from the GAST which have not yet been identified
as component interfaces to the SAMM repository.
|
void |
updateRequiredInterfacesOfExistingPrimitiveComponents()
Updates the component interfaces of all interface
existing until now in the source code decorator.
|
public static final boolean PROVIDED_INTERFACE
public InterfaceBuilder(Root gastModel, SoMoXConfiguration configuration, AnalysisResult result)
gastModel - GAST model used in queries to the source codeconfiguration - Somox configuration used to retrieve settingsresult - The analysis result containing the root nodes of the models in which this builder will store
the created model elementspublic boolean findAndAddRequiredInterfaces(ComponentImplementingClassesLink componentCandidate)
IComponentInterfaceStrategy.componentCandidate - The component for which this method should create
required interfacespublic void addProvidedInterfaces(ComponentImplementingClassesLink componentCandidate)
componentCandidate - Source code annotation of the detected component for which the
provided interfaces should be created. It has to point to a PrimitiveComponent.public void updateRequiredInterfacesOfExistingPrimitiveComponents()
public void reverseEngineerRemainingInterfacesAsFreeFloatingInterfaces(AnalysisResult analysisResult, Root gastModel)
analysisResult - gastModel - public void removeInterfaceSelfAccesses(ComponentImplementingClassesLink primitiveComponent)
primitiveComponent -