aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/couscous/ast/sugar/AnonymousClass.java
blob: 08bb9a3a0d8ec520ea18ca532a9b92a3ce7bbe41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package org.zwobble.couscous.ast.sugar;

import org.zwobble.couscous.ast.FieldDeclarationNode;
import org.zwobble.couscous.ast.MethodNode;
import org.zwobble.couscous.frontends.java.AnonymousType;
import org.zwobble.couscous.types.Type;

import java.util.List;
import java.util.Optional;
import java.util.Set;

public class AnonymousClass {
    private final Optional<AnonymousType> type;
    private final Set<Type> superTypes;
    private final List<FieldDeclarationNode> fields;
    private final List<MethodNode> methods;

    public AnonymousClass(
        Optional<AnonymousType> type,
        Set<Type> superTypes,
        List<FieldDeclarationNode> fields,
        List<MethodNode> methods)
    {
        this.type = type;
        this.superTypes = superTypes;
        this.fields = fields;
        this.methods = methods;
    }

    public Optional<AnonymousType> getType() {
        return type;
    }

    public Set<Type> getSuperTypes() {
        return superTypes;
    }

    public List<FieldDeclarationNode> getFields() {
        return fields;
    }

    public List<MethodNode> getMethods() {
        return methods;
    }
}