|
| 1 | +package com.neuvem.java2graph.models; |
| 2 | + |
| 3 | +import java.util.ArrayList; |
| 4 | +import java.util.List; |
| 5 | + |
| 6 | +public class FieldNode { |
| 7 | + private String id; |
| 8 | + private String fqn; |
| 9 | + private String name; |
| 10 | + private String typeFqn; |
| 11 | + private String containingClassFqn; |
| 12 | + private List<AnnotationInfo> annotations; |
| 13 | + private String filePath; |
| 14 | + |
| 15 | + public FieldNode() {} |
| 16 | + |
| 17 | + public String getId() { return id; } |
| 18 | + public void setId(String id) { this.id = id; } |
| 19 | + |
| 20 | + public String getFqn() { return fqn; } |
| 21 | + public void setFqn(String fqn) { this.fqn = fqn; } |
| 22 | + |
| 23 | + public String getName() { return name; } |
| 24 | + public void setName(String name) { this.name = name; } |
| 25 | + |
| 26 | + public String getTypeFqn() { return typeFqn; } |
| 27 | + public void setTypeFqn(String typeFqn) { this.typeFqn = typeFqn; } |
| 28 | + |
| 29 | + public String getContainingClassFqn() { return containingClassFqn; } |
| 30 | + public void setContainingClassFqn(String containingClassFqn) { this.containingClassFqn = containingClassFqn; } |
| 31 | + |
| 32 | + public List<AnnotationInfo> getAnnotations() { |
| 33 | + if (annotations == null) annotations = new ArrayList<>(); |
| 34 | + return annotations; |
| 35 | + } |
| 36 | + public void setAnnotations(List<AnnotationInfo> annotations) { this.annotations = annotations; } |
| 37 | + |
| 38 | + public String getFilePath() { return filePath; } |
| 39 | + public void setFilePath(String filePath) { this.filePath = filePath; } |
| 40 | + |
| 41 | + public static Builder builder() { return new Builder(); } |
| 42 | + |
| 43 | + public static class Builder { |
| 44 | + private FieldNode node = new FieldNode(); |
| 45 | + public Builder id(String id) { node.id = id; return this; } |
| 46 | + public Builder fqn(String fqn) { node.fqn = fqn; return this; } |
| 47 | + public Builder name(String name) { node.name = name; return this; } |
| 48 | + public Builder typeFqn(String typeFqn) { node.typeFqn = typeFqn; return this; } |
| 49 | + public Builder containingClassFqn(String containingClassFqn) { node.containingClassFqn = containingClassFqn; return this; } |
| 50 | + public Builder annotations(List<AnnotationInfo> annotations) { node.annotations = annotations; return this; } |
| 51 | + public Builder filePath(String filePath) { node.filePath = filePath; return this; } |
| 52 | + public FieldNode build() { return node; } |
| 53 | + } |
| 54 | +} |
0 commit comments