Class ExpressionExporter
- java.lang.Object
-
- com.nomagic.magicdraw.mbple.expression.ExpressionExporter
-
@OpenApiAll public class ExpressionExporter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IMPLICIT_LANGUAGE_NAME
-
Constructor Summary
Constructors Constructor Description ExpressionExporter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
constructImplicitExpression(Constraint variationPoint, com.nomagic.magicdraw.mbple.expression.VariationPointArgumentsCollector argumentsCollector)
private static java.lang.String
extractBody(java.lang.String structuredExpressionXML)
private static java.lang.String
extractLanguage(java.lang.String structuredExpressionXML)
static java.lang.String
getExpressionLanguage(Comment elementValueSpecification)
Returns name of the expression language used to define the expression of the given element value specificationstatic java.lang.String
getExpressionLanguage(Constraint variationPoint)
Returns name of the expression language used to define the expression of the given variation pointstatic java.lang.String
getExpressionString(Comment elementValueSpecification)
Returns string representation of an expression used to evaluate any element with this variation pointstatic java.lang.String
getExpressionString(Constraint variationPoint)
Returns string representation of an expression used to evaluate any element with this variation pointprivate static java.lang.String
getInvertString(Dependency impact)
private static java.lang.String
getParameterDescription(Property feature, Dependency impact, com.nomagic.magicdraw.mbple.expression.VariationPointArgumentsCollector argumentsCollector)
private static java.lang.String
quote(java.lang.String text)
private static java.lang.String
unwrap(java.lang.String expression)
if whole expression string is wrapped into parentheses, remove them
-
-
-
Field Detail
-
IMPLICIT_LANGUAGE_NAME
public static final java.lang.String IMPLICIT_LANGUAGE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getExpressionString
public static java.lang.String getExpressionString(Constraint variationPoint)
Returns string representation of an expression used to evaluate any element with this variation point- Parameters:
variationPoint
- variation point element- Returns:
- readable expression string of this variation point. If expression is not explicitly typed in, the string is implicitly synthesized by the connected feature impacts. Empty string is returned if there is no expression and feature impacts, or the provided element is not a variation point.
-
getExpressionString
public static java.lang.String getExpressionString(Comment elementValueSpecification)
Returns string representation of an expression used to evaluate any element with this variation point- Parameters:
elementValueSpecification
- element value specification owned by some variation point- Returns:
- readable expression string of the given element value specification If expression is not explicitly typed in, the string is implicitly synthesized by the connected feature impact Empty string is returned if there is no expression and feature impacts, or the provided element is not a variation point.
-
constructImplicitExpression
private static java.lang.String constructImplicitExpression(Constraint variationPoint, com.nomagic.magicdraw.mbple.expression.VariationPointArgumentsCollector argumentsCollector)
-
getExpressionLanguage
public static java.lang.String getExpressionLanguage(Constraint variationPoint)
Returns name of the expression language used to define the expression of the given variation point- Parameters:
variationPoint
- variation point element- Returns:
- language of the expression of the provided variation point.
If expression is not explicitly typed in, then
IMPLICIT_LANGUAGE_NAME
is returned.
-
getExpressionLanguage
public static java.lang.String getExpressionLanguage(Comment elementValueSpecification)
Returns name of the expression language used to define the expression of the given element value specification- Parameters:
elementValueSpecification
- element value specification of an element property/tag variation point- Returns:
- language of the expression of the provided value specification.
If expression is not explicitly typed in, then
IMPLICIT_LANGUAGE_NAME
is returned.
-
unwrap
private static java.lang.String unwrap(java.lang.String expression)
if whole expression string is wrapped into parentheses, remove them
-
getParameterDescription
private static java.lang.String getParameterDescription(Property feature, Dependency impact, com.nomagic.magicdraw.mbple.expression.VariationPointArgumentsCollector argumentsCollector)
-
getInvertString
private static java.lang.String getInvertString(Dependency impact)
-
quote
private static java.lang.String quote(java.lang.String text)
-
extractBody
@CheckForNull private static java.lang.String extractBody(@CheckForNull java.lang.String structuredExpressionXML)
-
extractLanguage
@CheckForNull private static java.lang.String extractLanguage(java.lang.String structuredExpressionXML)
-
-