Package de.monticore.siunit.siunits.util
Class ASTSIUnit2SymTypeExprConverter
java.lang.Object
de.monticore.siunit.siunits.util.ASTSIUnit2SymTypeExprConverter
Helper, to convert ASTSIUnits to SymTypeExpressions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringSIUnit groupprotected static final Patternprotected static final Stringprotected static final StringUnit (no prefix), preferred.protected static final StringUnit (no prefix)protected static final StringPrefix (no unit)protected static final StringPrefix with unit, only some units applyprotected static final Patternprotected static final Patternprotected static final Patternprotected static final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanassertValidSIUnitGroup(String inputStr) logs an error if the input is not a valid SIUnitGroupprotected static SIUnitBasicstatic SymTypeOfSIUnitcreateSIUnit(ASTSIUnit ast) protected static SIUnitBasicprotected static List<SIUnitBasic> protected static List<SIUnitBasic> protected static List<SIUnitBasic> protected static List<SIUnitBasic> protected static List<SIUnitBasic> protected static Patternprotected static Patternprotected static Patternprotected static Patternprotected static Patternprotected static intgetValue(ASTSignedLiteral lit) protected static List<SIUnitBasic> string2SIUnitBasics(String inputStr) takes the String given by ASTSIUnitWith[out]Prefix (and only those, no "/", no exponent) and converts it into a list of SIUnitBasic
-
Field Details
-
PREFIX_UNIT_PATTERN
Prefix with unit, only some units apply- See Also:
-
NO_PREFIX_UNIT_PATTERN
Unit (no prefix)- See Also:
-
NO_PREFIX_PREFERED_UNIT_PATTERN
Unit (no prefix), preferred. In the String "min", 'min' ought to be matched, not 'm'. To guarantee this, this pattern is applied first.- See Also:
-
PREFIX_PATTERN
Prefix (no unit)- See Also:
-
GROUP_PATTERN
SIUnit group- See Also:
-
INTERNAL_LOGIC_ERROR
- See Also:
-
prefixPat
-
unitWithPrefixPat
-
unitWithoutPrefixPat
-
unitWithoutPrefixPrefPat
-
groupPat
-
-
Constructor Details
-
ASTSIUnit2SymTypeExprConverter
public ASTSIUnit2SymTypeExprConverter()
-
-
Method Details
-
createSIUnit
-
createSIUnit
-
createSIUnit
-
createSIUnit
-
createSIUnit
-
createSIUnit
-
createSIUnit
-
createSIUnit
-
string2SIUnitBasics
takes the String given by ASTSIUnitWith[out]Prefix (and only those, no "/", no exponent) and converts it into a list of SIUnitBasic -
assertValidSIUnitGroup
logs an error if the input is not a valid SIUnitGroup -
getValue
-
getPrefixPattern
-
getUnitWithPrefixPattern
-
getUnitWithoutPrefixPattern
-
getUnitWithoutPrefixPrefPattern
-
getGroupPattern
-