Class MCExceptionStatementsMill
java.lang.Object
de.monticore.statements.mcexceptionstatements.MCExceptionStatementsMill
- Direct Known Subclasses:
MCExceptionStatementsMillForGrammar_WithConcepts,MCExceptionStatementsMillForMCFullJavaStatements
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
FieldsModifier and TypeFieldDescriptionprotected MCExceptionStatementsFullPrettyPrinterprotected IMCExceptionStatementsGlobalScopeprotected static MCExceptionStatementsMillprotected IMCExceptionStatementsTypeDispatcher -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IMCExceptionStatementsArtifactScopeprotected ASTCatchClauseBuilderprotected ASTCatchTypeListBuilderprotected IMCExceptionStatementsGlobalScopeprotected MCExceptionStatementsTraverserprotected String_prettyPrint(de.monticore.ast.ASTNode node, boolean printComments) protected IMCExceptionStatementsScope_scope()protected MCExceptionStatementsScopesGenitorprotected MCExceptionStatementsTraverserprotected ASTThrowStatementBuilderprotected MCExceptionStatementsTraverserprotected ASTTryLocalVariableDeclarationBuilderprotected ASTTryStatement1Builderprotected ASTTryStatement2Builderprotected ASTTryStatement3Builderprotected IMCExceptionStatementsTypeDispatcherDeprecated, for removal: This API element is subject to removal in a future version.static ASTArgumentsBuilderstatic ASTBreakStatementBuilderstatic ASTCatchClauseBuilderstatic ASTCatchTypeListBuilderstatic ASTCommonForControlBuilderstatic ASTDeclaratorIdBuilderstatic ASTDefaultSwitchLabelBuilderstatic DiagramSymbolBuilderstatic ASTDoWhileStatementBuilderstatic ASTEmptyStatementBuilderstatic ASTEnhancedForControlBuilderstatic FieldSymbolBuilderstatic FieldSymbolSurrogateBuilderstatic ASTForInitBuilderstatic ASTFormalParameterBuilderstatic ASTForStatementBuilderstatic FunctionSymbolBuilderstatic MCExceptionStatementsMillgetMill()getState()EXPERIMENTAL! Returns the mill as an attribute (without static references required).static ASTIfStatementBuilderA traverser is the conceptual entry point for every action within the visitor infrastructure.static voidinit()Initializes a languages Mill.static voidstatic ASTLiteralExpressionBuilderstatic ASTMCImportStatementBuilderstatic ASTMCJavaBlockBuilderstatic ASTMCPrimitiveTypeBuilderstatic ASTMCQualifiedNameBuilderstatic ASTMCQualifiedTypeBuilderstatic ASTMCReturnTypeBuilderstatic MCStereotypeSymbolBuilderstatic ASTMCVoidTypeBuilderstatic MethodSymbolBuilderstatic MethodSymbolSurrogateBuilderstatic ASTModifierAbstractBuilderstatic ASTModifierConstBuilderstatic ASTModifierDefaultBuilderstatic ASTModifierFinalBuilderstatic ASTModifierNativeBuilderstatic ASTModifierPrivateBuilderstatic ASTModifierProtectedBuilderstatic ASTModifierPublicBuilderstatic ASTModifierStaticBuilderstatic ASTModifierStrictFpBuilderstatic ASTModifierThreadsafeBuilderstatic ASTModifierTransientBuilderstatic ASTModifierVolatileBuilderstatic ASTNameExpressionBuilderstatic OOTypeSymbolBuilderstatic OOTypeSymbolSurrogateBuilderstatic StringprettyPrint(de.monticore.ast.ASTNode node, boolean printComments) Uses the composed pretty printer to print an ASTNode of this languagestatic voidreset()static IMCExceptionStatementsScopescope()Returns a new ScopeGenitor.Returns a new ScopeGenitorDelegator.static voidEXPERIMENTAL! Loads the mill state into the static state.static ASTSimpleInitBuilderA traverser is the conceptual entry point for every action within the visitor infrastructure.static ASTSwitchStatementBuilderstatic ASTThrowStatementBuilderA traverser is the conceptual entry point for every action within the visitor infrastructure.static ASTTryStatement1Builderstatic ASTTryStatement2Builderstatic ASTTryStatement3BuilderDeprecated, for removal: This API element is subject to removal in a future version.static TypeSymbolBuilderstatic TypeSymbolSurrogateBuilderstatic TypeVarSymbolBuilderstatic ASTVariableDeclaratorBuilderstatic VariableSymbolBuilderstatic ASTWhileStatementBuilder
-
Field Details
-
mill
-
fullPrettyPrinter
-
typeDispatcher
-
mCExceptionStatementsGlobalScope
-
-
Constructor Details
-
MCExceptionStatementsMill
protected MCExceptionStatementsMill()
-
-
Method Details
-
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. -
tryStatement1Builder
-
_tryStatement1Builder
-
tryStatement2Builder
-
_tryStatement2Builder
-
tryStatement3Builder
-
_tryStatement3Builder
-
tryLocalVariableDeclarationBuilder
-
_tryLocalVariableDeclarationBuilder
-
catchClauseBuilder
-
_catchClauseBuilder
-
catchTypeListBuilder
-
_catchTypeListBuilder
-
throwStatementBuilder
-
_throwStatementBuilder
-
prettyPrint
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
-
typeDispatcher
Deprecated, for removal: This API element is subject to removal in a future version. -
_typeDispatcher
Deprecated, for removal: This API element is subject to removal in a future version. -
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
-
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
-
singleStepTraverser
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
-
_singleStepTraverser
-
globalScope
-
_globalScope
-
artifactScope
-
_artifactScope
-
scope
-
_scope
-
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
-
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
-
mCJavaBlockBuilder
-
modifierPrivateBuilder
-
modifierProtectedBuilder
-
modifierPublicBuilder
-
modifierStaticBuilder
-
modifierTransientBuilder
-
modifierFinalBuilder
-
modifierAbstractBuilder
-
modifierNativeBuilder
-
modifierThreadsafeBuilder
-
modifierSynchronizedBuilder
-
modifierConstBuilder
-
modifierVolatileBuilder
-
modifierStrictFpBuilder
-
modifierDefaultBuilder
-
ifStatementBuilder
-
forStatementBuilder
-
commonForControlBuilder
-
forInitBuilder
-
forInitByExpressionsBuilder
-
enhancedForControlBuilder
-
formalParameterBuilder
-
whileStatementBuilder
-
doWhileStatementBuilder
-
switchStatementBuilder
-
emptyStatementBuilder
-
expressionStatementBuilder
-
switchBlockStatementGroupBuilder
-
constantExpressionSwitchLabelBuilder
-
enumConstantSwitchLabelBuilder
-
defaultSwitchLabelBuilder
-
breakStatementBuilder
-
localVariableDeclarationStatementBuilder
public static ASTLocalVariableDeclarationStatementBuilder localVariableDeclarationStatementBuilder() -
localVariableDeclarationBuilder
-
variableDeclaratorBuilder
-
declaratorIdBuilder
-
simpleInitBuilder
-
mCQualifiedNameBuilder
-
mCPackageDeclarationBuilder
-
mCImportStatementBuilder
-
mCPrimitiveTypeBuilder
-
mCQualifiedTypeBuilder
-
mCReturnTypeBuilder
-
mCVoidTypeBuilder
-
nameExpressionBuilder
-
literalExpressionBuilder
-
argumentsBuilder
-
oOTypeSymbolBuilder
-
oOTypeSymbolSurrogateBuilder
-
fieldSymbolBuilder
-
fieldSymbolSurrogateBuilder
-
methodSymbolBuilder
-
methodSymbolSurrogateBuilder
-
diagramSymbolBuilder
-
diagramSymbolSurrogateBuilder
-
typeSymbolBuilder
-
typeSymbolSurrogateBuilder
-
typeVarSymbolBuilder
-
typeVarSymbolSurrogateBuilder
-
variableSymbolBuilder
-
variableSymbolSurrogateBuilder
-
functionSymbolBuilder
-
functionSymbolSurrogateBuilder
-
mCStereotypeSymbolBuilder
-
mCStereotypeSymbolSurrogateBuilder
-
initMe
-
reset
public static void reset() -
getState
EXPERIMENTAL! Returns the mill as an attribute (without static references required).- Returns:
- the mill state
-
setState
EXPERIMENTAL! Loads the mill state into the static state.- Parameters:
state- The non-static state, see #getState()
-