Class MCFullGenericTypesMill
- java.lang.Object
-
- de.monticore.types.mcfullgenerictypes.MCFullGenericTypesMill
-
- Direct Known Subclasses:
MCFullGenericTypesMillForGrammar_WithConcepts,MCFullGenericTypesMillForJavaClassExpressions,MCFullGenericTypesMillForJavaLight,MCFullGenericTypesMillForODRuleGeneration,MCFullGenericTypesMillForODRules,MCFullGenericTypesMillForTFBasisExts,MCFullGenericTypesMillForTFCommons
public class MCFullGenericTypesMill extends java.lang.ObjectThe 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 MCFullGenericTypesFullPrettyPrinterfullPrettyPrinterprotected IMCFullGenericTypesGlobalScopemCFullGenericTypesGlobalScopeprotected static MCFullGenericTypesMillmillprotected IMCFullGenericTypesTypeDispatchertypeDispatcher
-
Constructor Summary
Constructors Modifier Constructor Description protectedMCFullGenericTypesMill()
-
Method Summary
-
-
-
Field Detail
-
mill
protected static MCFullGenericTypesMill mill
-
fullPrettyPrinter
protected MCFullGenericTypesFullPrettyPrinter fullPrettyPrinter
-
typeDispatcher
protected IMCFullGenericTypesTypeDispatcher typeDispatcher
-
mCFullGenericTypesGlobalScope
protected IMCFullGenericTypesGlobalScope mCFullGenericTypesGlobalScope
-
-
Method Detail
-
getMill
public static MCFullGenericTypesMill 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.
-
mCWildcardTypeArgumentBuilder
public static ASTMCWildcardTypeArgumentBuilder mCWildcardTypeArgumentBuilder()
-
_mCWildcardTypeArgumentBuilder
protected ASTMCWildcardTypeArgumentBuilder _mCWildcardTypeArgumentBuilder()
-
mCMultipleGenericTypeBuilder
public static ASTMCMultipleGenericTypeBuilder mCMultipleGenericTypeBuilder()
-
_mCMultipleGenericTypeBuilder
protected ASTMCMultipleGenericTypeBuilder _mCMultipleGenericTypeBuilder()
-
mCInnerTypeBuilder
public static ASTMCInnerTypeBuilder mCInnerTypeBuilder()
-
_mCInnerTypeBuilder
protected ASTMCInnerTypeBuilder _mCInnerTypeBuilder()
-
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 IMCFullGenericTypesTypeDispatcher typeDispatcher()
-
_typeDispatcher
protected IMCFullGenericTypesTypeDispatcher _typeDispatcher()
-
traverser
public static MCFullGenericTypesTraverser 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 MCFullGenericTypesTraverser _traverser()
-
inheritanceTraverser
public static MCFullGenericTypesTraverser 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 MCFullGenericTypesTraverser _inheritanceTraverser()
-
globalScope
public static IMCFullGenericTypesGlobalScope globalScope()
-
_globalScope
protected IMCFullGenericTypesGlobalScope _globalScope()
-
artifactScope
public static IMCFullGenericTypesArtifactScope artifactScope()
-
_artifactScope
protected IMCFullGenericTypesArtifactScope _artifactScope()
-
scope
public static IMCFullGenericTypesScope scope()
-
_scope
protected IMCFullGenericTypesScope _scope()
-
scopesGenitor
public static MCFullGenericTypesScopesGenitor 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 MCFullGenericTypesScopesGenitor _scopesGenitor()
-
scopesGenitorDelegator
public static MCFullGenericTypesScopesGenitorDelegator 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 MCFullGenericTypesScopesGenitorDelegator _scopesGenitorDelegator()
-
mCBasicGenericTypeBuilder
public static ASTMCBasicGenericTypeBuilder mCBasicGenericTypeBuilder()
-
mCCustomTypeArgumentBuilder
public static ASTMCCustomTypeArgumentBuilder mCCustomTypeArgumentBuilder()
-
mCListTypeBuilder
public static ASTMCListTypeBuilder mCListTypeBuilder()
-
mCOptionalTypeBuilder
public static ASTMCOptionalTypeBuilder mCOptionalTypeBuilder()
-
mCMapTypeBuilder
public static ASTMCMapTypeBuilder mCMapTypeBuilder()
-
mCSetTypeBuilder
public static ASTMCSetTypeBuilder mCSetTypeBuilder()
-
mCBasicTypeArgumentBuilder
public static ASTMCBasicTypeArgumentBuilder mCBasicTypeArgumentBuilder()
-
mCPrimitiveTypeArgumentBuilder
public static ASTMCPrimitiveTypeArgumentBuilder mCPrimitiveTypeArgumentBuilder()
-
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()
-
initMe
public static void initMe(MCFullGenericTypesMill a)
-
reset
public static void reset()
-
-