Class MCSimpleGenericTypesMill

java.lang.Object
de.monticore.types.mcsimplegenerictypes.MCSimpleGenericTypesMill
Direct Known Subclasses:
MCSimpleGenericTypesMillForGrammar, MCSimpleGenericTypesMillForGrammar_WithConcepts, MCSimpleGenericTypesMillForJavaClassExpressions, MCSimpleGenericTypesMillForJavaLight, MCSimpleGenericTypesMillForMCComponentTypes, MCSimpleGenericTypesMillForMCFullGenericTypes, MCSimpleGenericTypesMillForODRuleGeneration, MCSimpleGenericTypesMillForODRules, MCSimpleGenericTypesMillForTFBasisExts, MCSimpleGenericTypesMillForTFCommons

@Generated("monticore") public class MCSimpleGenericTypesMill extends 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 Details

  • Constructor Details

    • MCSimpleGenericTypesMill

      protected MCSimpleGenericTypesMill()
  • Method Details

    • getMill

      public static MCSimpleGenericTypesMill 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.
    • mCBasicGenericTypeBuilder

      public static ASTMCBasicGenericTypeBuilder mCBasicGenericTypeBuilder()
    • _mCBasicGenericTypeBuilder

      protected ASTMCBasicGenericTypeBuilder _mCBasicGenericTypeBuilder()
    • mCCustomTypeArgumentBuilder

      public static ASTMCCustomTypeArgumentBuilder mCCustomTypeArgumentBuilder()
    • _mCCustomTypeArgumentBuilder

      protected ASTMCCustomTypeArgumentBuilder _mCCustomTypeArgumentBuilder()
    • prettyPrint

      public static 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 printed
      printComments - Whether comments should be printed
      Returns:
      The pretty printer output
    • _prettyPrint

      protected String _prettyPrint(de.monticore.ast.ASTNode node, boolean printComments)
    • typeDispatcher

      @Deprecated(forRemoval=true) public static IMCSimpleGenericTypesTypeDispatcher typeDispatcher()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • _typeDispatcher

      @Deprecated(forRemoval=true) protected IMCSimpleGenericTypesTypeDispatcher _typeDispatcher()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • traverser

      public static MCSimpleGenericTypesTraverser 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 requiring ITraverser.clearTraversedElements() to be called in case of re-use inheritanceTraverser() should be preferred over normal traverser, as they further enable language composition.
      Returns:
      a new instance of this language's traverser
    • _traverser

      protected MCSimpleGenericTypesTraverser _traverser()
    • inheritanceTraverser

      public static MCSimpleGenericTypesTraverser 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 requiring ITraverser.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 MCSimpleGenericTypesTraverser _inheritanceTraverser()
    • singleStepTraverser

      public static MCSimpleGenericTypesTraverser 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 requiring ITraverser.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

      protected MCSimpleGenericTypesTraverser _singleStepTraverser()
    • globalScope

      public static IMCSimpleGenericTypesGlobalScope globalScope()
    • _globalScope

      protected IMCSimpleGenericTypesGlobalScope _globalScope()
    • artifactScope

      public static IMCSimpleGenericTypesArtifactScope artifactScope()
    • _artifactScope

      protected IMCSimpleGenericTypesArtifactScope _artifactScope()
    • scope

      public static IMCSimpleGenericTypesScope scope()
    • _scope

      protected IMCSimpleGenericTypesScope _scope()
    • scopesGenitor

      public static MCSimpleGenericTypesScopesGenitor 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 for scopesGenitorDelegator().
      Returns:
      a new instance of this language's scope genitor
    • _scopesGenitor

      protected MCSimpleGenericTypesScopesGenitor _scopesGenitor()
    • scopesGenitorDelegator

      public static MCSimpleGenericTypesScopesGenitorDelegator 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 MCSimpleGenericTypesScopesGenitorDelegator _scopesGenitorDelegator()
    • 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(MCSimpleGenericTypesMill a)
    • reset

      public static void reset()
    • getState

      public static MCSimpleGenericTypesMillState getState()
      EXPERIMENTAL! Returns the mill as an attribute (without static references required).
      Returns:
      the mill state
    • setState

      public static void setState(MCSimpleGenericTypesMillState state)
      EXPERIMENTAL! Loads the mill state into the static state.
      Parameters:
      state - The non-static state, see #getState()