Package de.monticore.tf.odrules.util
Class Util
java.lang.Object
de.monticore.tf.odrules.util.Util
Created by
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<ASTODObject> Returns all ODObjects in the given node.static StringgetLeftRoleType(ASTODLink node, ASTODDefinition lhs) static Optional<RuleComponentSymbol> getMCAttributeSymbol(String attributeName, ASTODObject leftObject, MCGrammarSymbol grammarSymbol) Deprecated.static ASTODObjectgetODObject(ASTODDefinition node, String attrName) Resolves an ODObject by it's name.static ASTODObjectgetODObject(ASTODObject node, String attrName) Resolves an ODObject by it's name.static StringgetRightRoleType(ASTODLink node, ASTODDefinition rhs) static booleanisBuiltInType(ASTODAttribute attribute) static booleanisIterated(ASTODLink node, ASTODDefinition def, MCGrammarSymbol grammarSymbol) Deprecated.static booleanisIterated(ASTODLink node, ASTODObject leftObject, MCGrammarSymbol grammarSymbol) Deprecated.static booleanisIterated(ASTODObject object, ASTODAttribute attribute, MCGrammarSymbol grammarSymbol) Deprecated.static booleanisOptional(ASTODLink node, ASTODDefinition def, MCGrammarSymbol grammarSymbol) Deprecated.static booleanisOptional(ASTODLink node, ASTODObject astodObject, MCGrammarSymbol grammarSymbol) Deprecated.static booleanisOptional(ASTODObject object, ASTODAttribute attribute, MCGrammarSymbol grammarSymbol) Deprecated.static booleanisOptional(Optional<ASTODObject> target, String attrname, MCGrammarSymbol grammarSymbol) Deprecated.static StringmakeSingular(String name) static Stringprint(ASTMCJavaBlock doblock) static Stringprint(ASTMCJavaBlock doblock, List<ASTMatchingObject> objects, HierarchyHelper helper) static StringprintExpression(ASTExpression astExpression) static StringprintExpression(ASTExpression astExpression, List<ASTMatchingObject> objects, HierarchyHelper helper) static StringprintFirstListValue(ASTArrayInit astArrayInit) static StringprintImportDeclaration(ASTMCImportStatement importDeclaration) static StringprintListValue(ASTArrayInit initializer) static String
-
Constructor Details
-
Util
protected Util()
-
-
Method Details
-
getODObject
Resolves an ODObject by it's name.- Parameters:
node- the parent ODDefinitionattrName- the object's name- Returns:
- the ASTODObject
-
getODObject
Resolves an ODObject by it's name.- Parameters:
node- the parent ODObjectattrName- the object's name- Returns:
- the ASTODObject
-
getAllODObjects
Returns all ODObjects in the given node. This includes objects in inner links of other objects.- Parameters:
node- the node- Returns:
- all ASTODObjects
-
printImportDeclaration
-
printExpression
-
printExpression
public static String printExpression(ASTExpression astExpression, List<ASTMatchingObject> objects, HierarchyHelper helper) -
printListValue
-
printFirstListValue
-
print
-
print
public static String print(ASTMCJavaBlock doblock, List<ASTMatchingObject> objects, HierarchyHelper helper) -
getRightRoleType
-
getLeftRoleType
-
isBuiltInType
-
isIterated
@Deprecated public static boolean isIterated(ASTODLink node, ASTODDefinition def, MCGrammarSymbol grammarSymbol) Deprecated. -
isIterated
@Deprecated public static boolean isIterated(ASTODLink node, ASTODObject leftObject, MCGrammarSymbol grammarSymbol) Deprecated. -
isOptional
@Deprecated public static boolean isOptional(ASTODLink node, ASTODDefinition def, MCGrammarSymbol grammarSymbol) Deprecated. -
isOptional
@Deprecated public static boolean isOptional(ASTODLink node, ASTODObject astodObject, MCGrammarSymbol grammarSymbol) Deprecated. -
getMCAttributeSymbol
@Deprecated public static Optional<RuleComponentSymbol> getMCAttributeSymbol(String attributeName, ASTODObject leftObject, MCGrammarSymbol grammarSymbol) Deprecated. -
isIterated
@Deprecated public static boolean isIterated(ASTODObject object, ASTODAttribute attribute, MCGrammarSymbol grammarSymbol) Deprecated. -
isOptional
@Deprecated public static boolean isOptional(ASTODObject object, ASTODAttribute attribute, MCGrammarSymbol grammarSymbol) Deprecated. -
isOptional
@Deprecated public static boolean isOptional(Optional<ASTODObject> target, String attrname, MCGrammarSymbol grammarSymbol) Deprecated. -
makeSingular
-
printType
-