Added classdiagramm for Generators

This commit is contained in:
ahmad 2024-07-04 17:43:20 +02:00
parent 844e1f2d33
commit 47ba227e04

View File

@ -0,0 +1,61 @@
```plantuml
@startuml
left to ri
!theme plain
top to bottom direction
skinparam linetype ortho
class ASTGenerator {
+ ASTGenerator():
+ generateMethod(MethContext): Method
+ getType(TypeContext): Type?
+ getType(ReturntypeContext): Type?
+ generateFieldVariable(FieldContext): Declaration
+ generateParameter(ParamContext): Parameter
+ generateConstructor(ConstructorContext): Constructor
+ generateAST(ClassContext, CollectingErrorListener): Class
}
class BlockGenerator {
+ BlockGenerator(CollectingErrorListener):
+ visitBlock(BlockContext): Block
}
class ExpressionGenerator {
+ ExpressionGenerator(CollectingErrorListener):
+ visitMethodCall(MethodCallContext): Expression
+ generateOperator(BinaryOpContext, CollectingErrorListener): Operator?
+ generateRecursiveOwnerChain(List<RecipientContext>, Expression, Boolean, CollectingErrorListener): Expression?
+ visitExpression(ExpressionContext): Expression
+ visitConstant(ConstantContext): Expression
+ generateConstant(LiteralContext, CollectingErrorListener): Expression?
+ visitIdentifier(IdentifierContext): Expression
+ visitStatementExpressionexpr(StatementExpressionexprContext): Expression
+ generateBinary(BinaryOperationContext, CollectingErrorListener): Binary
- pointBeforeLineLogic(BinaryOperationContext, Binary): Binary
+ visitUnaryOperation(UnaryOperationContext): Expression
+ visitBinaryOperation(BinaryOperationContext): Expression
+ visitNew(NewContext): Expression
}
class StatementGenerator {
+ StatementGenerator(CollectingErrorListener):
+ visitPrint(PrintContext): List<Statement>
+ visitAssignment(AssignmentContext): List<Statement>
+ visitDoWhile(DoWhileContext): List<Statement>
+ visitWhile(WhileContext): List<Statement>
+ resolveFancyAssign(AssignSignContext, FieldVarAccess, Expression, CollectingErrorListener): Expression?
+ visitLocalVarDec(LocalVarDecContext): List<Statement>
+ visitStatementExpressionstmt(StatementExpressionstmtContext): List<Statement>
+ visitIf(IfContext): List<Statement>
+ visitLocalVarDecWithInitialization(LocalVarDecWithInitializationContext): List<Statement>
+ visitBreak(BreakContext): List<Statement>
- generateField(FieldVarAccessContext): FieldVarAccess
+ visitMethodCall(MethodCallContext): List<Statement>
+ visitNew(NewContext): List<Statement>
+ generateNew(NewCallContext, CollectingErrorListener): New
+ visitFor(ForContext): List<Statement>
- generateAssign(AssignContext): Assignment
+ visitContinue(ContinueContext): List<Statement>
}
@enduml
```