Package de.monticore.ocl.oclexpressions
Class OCLExpressionsMill
- java.lang.Object
-
- de.monticore.ocl.oclexpressions.OCLExpressionsMill
-
public class OCLExpressionsMill extends java.lang.Object
The mill is a factory for builders and other commonly used functions, such as parsers or visitors. The mill was introduced to ensure compositionality of languages, while retaining reusability of functions developed for sublanguages. Only one mill instance exists, even though in composed languages it is available under several static signatures.
-
-
Field Summary
Fields Modifier and Type Field Description protected OCLExpressionsFullPrettyPrinter
fullPrettyPrinter
protected static OCLExpressionsMill
mill
protected IOCLExpressionsGlobalScope
oCLExpressionsGlobalScope
protected IOCLExpressionsTypeDispatcher
typeDispatcher
-
Constructor Summary
Constructors Modifier Constructor Description protected
OCLExpressionsMill()
-
Method Summary
-
-
-
Field Detail
-
mill
protected static OCLExpressionsMill mill
-
fullPrettyPrinter
protected OCLExpressionsFullPrettyPrinter fullPrettyPrinter
-
typeDispatcher
protected IOCLExpressionsTypeDispatcher typeDispatcher
-
oCLExpressionsGlobalScope
protected IOCLExpressionsGlobalScope oCLExpressionsGlobalScope
-
-
Method Detail
-
getMill
public static OCLExpressionsMill getMill()
-
init
public static void init()
Initializes a languages Mill. This will also initialize the Mills of all languages it depends on. This ensures that all objects of this mill, such as builders, traversers, scopes, ..., deliver the element of the correct language.
-
oCLVariableDeclarationBuilder
public static ASTOCLVariableDeclarationBuilder oCLVariableDeclarationBuilder()
-
_oCLVariableDeclarationBuilder
protected ASTOCLVariableDeclarationBuilder _oCLVariableDeclarationBuilder()
-
typeIfExpressionBuilder
public static ASTTypeIfExpressionBuilder typeIfExpressionBuilder()
-
_typeIfExpressionBuilder
protected ASTTypeIfExpressionBuilder _typeIfExpressionBuilder()
-
typeIfThenExpressionBuilder
public static ASTTypeIfThenExpressionBuilder typeIfThenExpressionBuilder()
-
_typeIfThenExpressionBuilder
protected ASTTypeIfThenExpressionBuilder _typeIfThenExpressionBuilder()
-
ifThenElseExpressionBuilder
public static ASTIfThenElseExpressionBuilder ifThenElseExpressionBuilder()
-
_ifThenElseExpressionBuilder
protected ASTIfThenElseExpressionBuilder _ifThenElseExpressionBuilder()
-
impliesExpressionBuilder
public static ASTImpliesExpressionBuilder impliesExpressionBuilder()
-
_impliesExpressionBuilder
protected ASTImpliesExpressionBuilder _impliesExpressionBuilder()
-
equivalentExpressionBuilder
public static ASTEquivalentExpressionBuilder equivalentExpressionBuilder()
-
_equivalentExpressionBuilder
protected ASTEquivalentExpressionBuilder _equivalentExpressionBuilder()
-
forallExpressionBuilder
public static ASTForallExpressionBuilder forallExpressionBuilder()
-
_forallExpressionBuilder
protected ASTForallExpressionBuilder _forallExpressionBuilder()
-
existsExpressionBuilder
public static ASTExistsExpressionBuilder existsExpressionBuilder()
-
_existsExpressionBuilder
protected ASTExistsExpressionBuilder _existsExpressionBuilder()
-
anyExpressionBuilder
public static ASTAnyExpressionBuilder anyExpressionBuilder()
-
_anyExpressionBuilder
protected ASTAnyExpressionBuilder _anyExpressionBuilder()
-
letinExpressionBuilder
public static ASTLetinExpressionBuilder letinExpressionBuilder()
-
_letinExpressionBuilder
protected ASTLetinExpressionBuilder _letinExpressionBuilder()
-
iterateExpressionBuilder
public static ASTIterateExpressionBuilder iterateExpressionBuilder()
-
_iterateExpressionBuilder
protected ASTIterateExpressionBuilder _iterateExpressionBuilder()
-
inDeclarationBuilder
public static ASTInDeclarationBuilder inDeclarationBuilder()
-
_inDeclarationBuilder
protected ASTInDeclarationBuilder _inDeclarationBuilder()
-
inDeclarationVariableBuilder
public static ASTInDeclarationVariableBuilder inDeclarationVariableBuilder()
-
_inDeclarationVariableBuilder
protected ASTInDeclarationVariableBuilder _inDeclarationVariableBuilder()
-
oCLAtPreQualificationBuilder
public static ASTOCLAtPreQualificationBuilder oCLAtPreQualificationBuilder()
-
_oCLAtPreQualificationBuilder
protected ASTOCLAtPreQualificationBuilder _oCLAtPreQualificationBuilder()
-
oCLTransitiveQualificationBuilder
public static ASTOCLTransitiveQualificationBuilder oCLTransitiveQualificationBuilder()
-
_oCLTransitiveQualificationBuilder
protected ASTOCLTransitiveQualificationBuilder _oCLTransitiveQualificationBuilder()
-
prettyPrint
public static java.lang.String prettyPrint(de.monticore.ast.ASTNode node, boolean printComments)
Uses the composed pretty printer to print an ASTNode of this language- Parameters:
node
- The ASTNode to be printedprintComments
- Whether comments should be printed- Returns:
- The pretty printer output
-
_prettyPrint
protected java.lang.String _prettyPrint(de.monticore.ast.ASTNode node, boolean printComments)
-
typeDispatcher
public static IOCLExpressionsTypeDispatcher typeDispatcher()
-
_typeDispatcher
protected IOCLExpressionsTypeDispatcher _typeDispatcher()
-
traverser
public static OCLExpressionsTraverser traverser()
A traverser is the conceptual entry point for every action within the visitor infrastructure. Visitors may be added, which contain the implementations for the visit and endVisit methods. Handlers may be added to modify the default traversal strategy. Each traverser retains their traversed elements to avoid duplicate traversal, possibly requiringITraverser.clearTraversedElements()
to be called in case of re-useinheritanceTraverser()
should be preferred over normal traverser, as they further enable language composition.- Returns:
- a new instance of this language's traverser
-
_traverser
protected OCLExpressionsTraverser _traverser()
-
inheritanceTraverser
public static OCLExpressionsTraverser inheritanceTraverser()
A traverser is the conceptual entry point for every action within the visitor infrastructure. Visitors may be added, which contain the implementations for the visit and endVisit methods. Handlers may be added to modify the default traversal strategy. Each traverser retains their traversed elements to avoid duplicate traversal, possibly requiringITraverser.clearTraversedElements()
to be called in case of re-use Inheritance Traverser should be preferred over default ones, as they further enable language composition.- Returns:
- a new instance of this language's inheritance traverser
-
_inheritanceTraverser
protected OCLExpressionsTraverser _inheritanceTraverser()
-
globalScope
public static IOCLExpressionsGlobalScope globalScope()
-
_globalScope
protected IOCLExpressionsGlobalScope _globalScope()
-
artifactScope
public static IOCLExpressionsArtifactScope artifactScope()
-
_artifactScope
protected IOCLExpressionsArtifactScope _artifactScope()
-
scope
public static IOCLExpressionsScope scope()
-
_scope
protected IOCLExpressionsScope _scope()
-
scopesGenitor
public static OCLExpressionsScopesGenitor scopesGenitor()
Returns a new ScopeGenitor. ScopeGenitors are responsible for creating the scope structure of artifacts of only this language and linking it with the AST nodes. Note: ScopeGenitors do NOT delegate to elements of composed languages which is why you are most likely looking forscopesGenitorDelegator()
.- Returns:
- a new instance of this language's scope genitor
-
_scopesGenitor
protected OCLExpressionsScopesGenitor _scopesGenitor()
-
scopesGenitorDelegator
public static OCLExpressionsScopesGenitorDelegator scopesGenitorDelegator()
Returns a new ScopeGenitorDelegator. Delegates to the ScopeGenitors of composed languages, used for instantiating symbol tables in the context of language composition See the delegators #createFromAST method.- Returns:
- a new instance of this language's scope genitor delegator
-
_scopesGenitorDelegator
protected OCLExpressionsScopesGenitorDelegator _scopesGenitorDelegator()
-
nameExpressionBuilder
public static ASTNameExpressionBuilder nameExpressionBuilder()
-
literalExpressionBuilder
public static ASTLiteralExpressionBuilder literalExpressionBuilder()
-
argumentsBuilder
public static ASTArgumentsBuilder argumentsBuilder()
-
mCQualifiedNameBuilder
public static ASTMCQualifiedNameBuilder mCQualifiedNameBuilder()
-
mCPackageDeclarationBuilder
public static ASTMCPackageDeclarationBuilder mCPackageDeclarationBuilder()
-
mCImportStatementBuilder
public static ASTMCImportStatementBuilder mCImportStatementBuilder()
-
mCPrimitiveTypeBuilder
public static ASTMCPrimitiveTypeBuilder mCPrimitiveTypeBuilder()
-
mCQualifiedTypeBuilder
public static ASTMCQualifiedTypeBuilder mCQualifiedTypeBuilder()
-
mCReturnTypeBuilder
public static ASTMCReturnTypeBuilder mCReturnTypeBuilder()
-
mCVoidTypeBuilder
public static ASTMCVoidTypeBuilder mCVoidTypeBuilder()
-
diagramSymbolBuilder
public static DiagramSymbolBuilder diagramSymbolBuilder()
-
diagramSymbolSurrogateBuilder
public static DiagramSymbolSurrogateBuilder diagramSymbolSurrogateBuilder()
-
typeSymbolBuilder
public static TypeSymbolBuilder typeSymbolBuilder()
-
typeSymbolSurrogateBuilder
public static TypeSymbolSurrogateBuilder typeSymbolSurrogateBuilder()
-
typeVarSymbolBuilder
public static TypeVarSymbolBuilder typeVarSymbolBuilder()
-
typeVarSymbolSurrogateBuilder
public static TypeVarSymbolSurrogateBuilder typeVarSymbolSurrogateBuilder()
-
variableSymbolBuilder
public static VariableSymbolBuilder variableSymbolBuilder()
-
variableSymbolSurrogateBuilder
public static VariableSymbolSurrogateBuilder variableSymbolSurrogateBuilder()
-
functionSymbolBuilder
public static FunctionSymbolBuilder functionSymbolBuilder()
-
functionSymbolSurrogateBuilder
public static FunctionSymbolSurrogateBuilder functionSymbolSurrogateBuilder()
-
mCStereotypeSymbolBuilder
public static MCStereotypeSymbolBuilder mCStereotypeSymbolBuilder()
-
mCStereotypeSymbolSurrogateBuilder
public static MCStereotypeSymbolSurrogateBuilder mCStereotypeSymbolSurrogateBuilder()
-
initMe
public static void initMe(OCLExpressionsMill a)
-
reset
public static void reset()
-
-