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 ProjectImportprocessConflict(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt)Processes a conflict statement including import restrictions.static ProjectImportprocessConflict(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt, ExpressionTranslator translator, TypeContext context)Processes a conflict statement including import restrictions.static ProjectImportprocessImport(de.uni_hildesheim.sse.ivml.ImportStmt importStmt)Processes an import statement including import restrictions.static ProjectImportprocessImport(de.uni_hildesheim.sse.ivml.ImportStmt importStmt, ExpressionTranslator translator, TypeContext context)Processes an import statement including import restrictions.private static IVersionRestrictionprocessRestrictionExpression(java.lang.String name, de.uni_hildesheim.sse.ivml.Expression expr, ExpressionTranslator translator, TypeContext context, IMessageHandler handler)Turns an ECore expression into a version restriction.
-
-
-
Method Detail
-
processRestrictionExpression
private static IVersionRestriction processRestrictionExpression(java.lang.String name, de.uni_hildesheim.sse.ivml.Expression expr, ExpressionTranslator translator, TypeContext context, IMessageHandler handler) throws TranslatorException, RestrictionEvaluationException
Turns 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:
TranslatorException- in case of translation problemsRestrictionEvaluationException- in case of problems while creating the restriction
-
processConflict
public static ProjectImport processConflict(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt) throws TranslatorException
Processes 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:
TranslatorException- in case of semantic errors
-
processConflict
public static ProjectImport processConflict(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt, ExpressionTranslator translator, TypeContext context) throws TranslatorException
Processes 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:
TranslatorException- in case of semantic errors
-
processImport
public static ProjectImport processImport(de.uni_hildesheim.sse.ivml.ImportStmt importStmt) throws TranslatorException
Processes 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:
TranslatorException- in case of semantic errors
-
processImport
public static ProjectImport processImport(de.uni_hildesheim.sse.ivml.ImportStmt importStmt, ExpressionTranslator translator, TypeContext context) throws TranslatorException
Processes 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:
TranslatorException- in case of semantic errors
-
-