1 package org.codehaus.plexus.compiler;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import java.util.ArrayList;
22 import java.util.List;
23
24
25
26
27
28
29
30
31 public class CompilerResult {
32 private boolean success;
33
34 private List<CompilerMessage> compilerMessages;
35
36
37
38
39 public CompilerResult() {
40 this.success = true;
41 }
42
43
44
45
46
47
48
49 public CompilerResult(boolean success, List<CompilerMessage> compilerMessages) {
50 this.success = success;
51 this.compilerMessages = compilerMessages;
52 }
53
54 public boolean isSuccess() {
55 return success;
56 }
57
58 public void setSuccess(boolean success) {
59 this.success = success;
60 }
61
62 public CompilerResult success(boolean success) {
63 this.setSuccess(success);
64 return this;
65 }
66
67 public List<CompilerMessage> getCompilerMessages() {
68 if (compilerMessages == null) {
69 this.compilerMessages = new ArrayList<>();
70 }
71 return compilerMessages;
72 }
73
74 public void setCompilerMessages(List<CompilerMessage> compilerMessages) {
75 this.compilerMessages = compilerMessages;
76 }
77
78 public CompilerResult compilerMessages(List<CompilerMessage> compilerMessages) {
79 this.setCompilerMessages(compilerMessages);
80 return this;
81 }
82 }