Class ImportTranslator
- java.lang.Object
-
- de.uni_hildesheim.sse.translation.ImportTranslator
-
public class ImportTranslator extends java.lang.ObjectA class which specifically does the import translations. The methods are available for reuse.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description ImportTranslator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetImportName(de.uni_hildesheim.sse.ivml.ImportStmt importStmt)Returns the (wildcarded) import name.static net.ssehub.easy.varModel.model.ProjectImportprocessConflict(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt)Processes a conflict statement including import restrictions.static net.ssehub.easy.varModel.model.ProjectImportprocessConflict(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt, ExpressionTranslator translator, TypeContext context)Processes a conflict statement including import restrictions.static net.ssehub.easy.varModel.model.ProjectImportprocessImport(de.uni_hildesheim.sse.ivml.ImportStmt importStmt)Processes an import statement including import restrictions.static net.ssehub.easy.varModel.model.ProjectImportprocessImport(de.uni_hildesheim.sse.ivml.ImportStmt importStmt, ExpressionTranslator translator, TypeContext context)Processes an import statement including import restrictions.private static net.ssehub.easy.basics.modelManagement.IVersionRestrictionprocessRestrictionExpression(java.lang.String name, de.uni_hildesheim.sse.ivml.Expression expr, ExpressionTranslator translator, TypeContext context, net.ssehub.easy.basics.messages.IMessageHandler handler)Turns an ECore expression into a version restriction.
-
-
-
Method Detail
-
processRestrictionExpression
private static net.ssehub.easy.basics.modelManagement.IVersionRestriction processRestrictionExpression(java.lang.String name, de.uni_hildesheim.sse.ivml.Expression expr, ExpressionTranslator translator, TypeContext context, net.ssehub.easy.basics.messages.IMessageHandler handler) throws net.ssehub.easy.dslCore.translation.TranslatorException, net.ssehub.easy.basics.modelManagement.RestrictionEvaluationExceptionTurns an ECore expression into a version restriction.- Parameters:
name- the name of the element being processedexpr- the expression to be turned into a version restriction (may be null but then the result will also be null).translator- the expression translator (may be null but then the result will also be null)context- the current type context (may be null but then the result will also be null)handler- an optional message handler (may be null)- Returns:
- the related version restriction (may be null)
- Throws:
net.ssehub.easy.dslCore.translation.TranslatorException- in case of translation problemsnet.ssehub.easy.basics.modelManagement.RestrictionEvaluationException- in case of problems while creating the restriction
-
processConflict
public static net.ssehub.easy.varModel.model.ProjectImport processConflict(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt) throws net.ssehub.easy.dslCore.translation.TranslatorExceptionProcesses a conflict statement including import restrictions. In case of errors the respective element is not added to the resulting project. Anyway, no restriction expressions are produced!- Parameters:
conflictStmt- the conflict statement- Returns:
- the related IVML model instance
- Throws:
net.ssehub.easy.dslCore.translation.TranslatorException- in case of semantic errors
-
processConflict
public static net.ssehub.easy.varModel.model.ProjectImport processConflict(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt, ExpressionTranslator translator, TypeContext context) throws net.ssehub.easy.dslCore.translation.TranslatorExceptionProcesses a conflict statement including import restrictions. In case of errors the respective element is not added to the resulting project.- Parameters:
conflictStmt- the conflict statementtranslator- the expression translator (may be null but then no restriction expressions are produced)context- the current type context (may be null but then no restriction expressions are produced)- Returns:
- the related IVML model instance
- Throws:
net.ssehub.easy.dslCore.translation.TranslatorException- in case of semantic errors
-
processImport
public static net.ssehub.easy.varModel.model.ProjectImport processImport(de.uni_hildesheim.sse.ivml.ImportStmt importStmt) throws net.ssehub.easy.dslCore.translation.TranslatorExceptionProcesses an import statement including import restrictions. In case of errors the respective element is not added to the resulting project. Anyway, no restriction expressions are produced!- Parameters:
importStmt- the import statement- Returns:
- the related IVML model instance
- Throws:
net.ssehub.easy.dslCore.translation.TranslatorException- in case of semantic errors
-
processImport
public static net.ssehub.easy.varModel.model.ProjectImport processImport(de.uni_hildesheim.sse.ivml.ImportStmt importStmt, ExpressionTranslator translator, TypeContext context) throws net.ssehub.easy.dslCore.translation.TranslatorExceptionProcesses an import statement including import restrictions. In case of errors the respective element is not added to the resulting project.- Parameters:
importStmt- the import statementtranslator- the expression translator (may be null but then no restriction expressions are produced)context- the current type context (may be null but then no restriction expressions are produced)- Returns:
- the related IVML model instance
- Throws:
net.ssehub.easy.dslCore.translation.TranslatorException- in case of semantic errors
-
getImportName
public static java.lang.String getImportName(de.uni_hildesheim.sse.ivml.ImportStmt importStmt)
Returns the (wildcarded) import name.- Parameters:
importStmt- the import statement- Returns:
- the (wildcarded) import name
-
-