Class UglyExpressionsMill

java.lang.Object
de.monticore.expressions.uglyexpressions.UglyExpressionsMill
Direct Known Subclasses:
UglyExpressionsMillForGrammar_WithConcepts, UglyExpressionsMillForJavaClassExpressions, UglyExpressionsMillForJavaLight, UglyExpressionsMillForODRules, UglyExpressionsMillForTFBasisExts, UglyExpressionsMillForTFCommons

public class UglyExpressionsMill 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

    • UglyExpressionsMill

      protected UglyExpressionsMill()
  • Method Details

    • getMill

      public static UglyExpressionsMill 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.
    • typeCastExpressionBuilder

      public static ASTTypeCastExpressionBuilder typeCastExpressionBuilder()
    • _typeCastExpressionBuilder

      protected ASTTypeCastExpressionBuilder _typeCastExpressionBuilder()
    • instanceofExpressionBuilder

      public static ASTInstanceofExpressionBuilder instanceofExpressionBuilder()
    • _instanceofExpressionBuilder

      protected ASTInstanceofExpressionBuilder _instanceofExpressionBuilder()
    • creatorExpressionBuilder

      public static ASTCreatorExpressionBuilder creatorExpressionBuilder()
    • _creatorExpressionBuilder

      protected ASTCreatorExpressionBuilder _creatorExpressionBuilder()
    • classCreatorBuilder

      public static ASTClassCreatorBuilder classCreatorBuilder()
    • _classCreatorBuilder

      protected ASTClassCreatorBuilder _classCreatorBuilder()
    • arrayCreatorBuilder

      public static ASTArrayCreatorBuilder arrayCreatorBuilder()
    • _arrayCreatorBuilder

      protected ASTArrayCreatorBuilder _arrayCreatorBuilder()
    • arrayDimensionByExpressionBuilder

      public static ASTArrayDimensionByExpressionBuilder arrayDimensionByExpressionBuilder()
    • _arrayDimensionByExpressionBuilder

      protected ASTArrayDimensionByExpressionBuilder _arrayDimensionByExpressionBuilder()
    • 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

      public static IUglyExpressionsTypeDispatcher typeDispatcher()
    • _typeDispatcher

      protected IUglyExpressionsTypeDispatcher _typeDispatcher()
    • traverser

      public static UglyExpressionsTraverser 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 UglyExpressionsTraverser _traverser()
    • inheritanceTraverser

      public static UglyExpressionsTraverser 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 UglyExpressionsTraverser _inheritanceTraverser()
    • globalScope

      public static IUglyExpressionsGlobalScope globalScope()
    • _globalScope

      protected IUglyExpressionsGlobalScope _globalScope()
    • artifactScope

      public static IUglyExpressionsArtifactScope artifactScope()
    • _artifactScope

      protected IUglyExpressionsArtifactScope _artifactScope()
    • scope

      public static IUglyExpressionsScope scope()
    • _scope

      protected IUglyExpressionsScope _scope()
    • scopesGenitor

      public static UglyExpressionsScopesGenitor 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 UglyExpressionsScopesGenitor _scopesGenitor()
    • scopesGenitorDelegator

      public static UglyExpressionsScopesGenitorDelegator 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 UglyExpressionsScopesGenitorDelegator _scopesGenitorDelegator()
    • 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()
    • nameExpressionBuilder

      public static ASTNameExpressionBuilder nameExpressionBuilder()
    • literalExpressionBuilder

      public static ASTLiteralExpressionBuilder literalExpressionBuilder()
    • argumentsBuilder

      public static ASTArgumentsBuilder argumentsBuilder()
    • initMe

      public static void initMe(UglyExpressionsMill a)
    • reset

      public static void reset()