-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breaking: enabling lazy loading of all configuration (refs #23)
- Loading branch information
1 parent
c5ea74d
commit ad35cda
Showing
5 changed files
with
342 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
src/main/java/se/bjurr/violations/gradle/plugin/ViolationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package se.bjurr.violations.gradle.plugin; | ||
|
||
import java.util.Objects; | ||
import se.bjurr.violations.lib.reports.Parser; | ||
|
||
public class ViolationConfig { | ||
private String reporter; | ||
private Parser parser; | ||
private String folder; | ||
private String pattern; | ||
|
||
public ViolationConfig() {} | ||
|
||
public String getReporter() { | ||
return this.reporter; | ||
} | ||
|
||
public ViolationConfig setReporter(final String reporter) { | ||
this.reporter = reporter; | ||
return this; | ||
} | ||
|
||
public Parser getParser() { | ||
return this.parser; | ||
} | ||
|
||
public ViolationConfig setParser(final Parser parser) { | ||
this.parser = parser; | ||
return this; | ||
} | ||
|
||
public String getFolder() { | ||
return this.folder; | ||
} | ||
|
||
public ViolationConfig setFolder(final String folder) { | ||
this.folder = folder; | ||
return this; | ||
} | ||
|
||
public String getPattern() { | ||
return this.pattern; | ||
} | ||
|
||
public ViolationConfig setPattern(final String pattern) { | ||
this.pattern = pattern; | ||
return this; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(this.folder, this.parser, this.pattern, this.reporter); | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (this.getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
final ViolationConfig other = (ViolationConfig) obj; | ||
return Objects.equals(this.folder, other.folder) | ||
&& this.parser == other.parser | ||
&& Objects.equals(this.pattern, other.pattern) | ||
&& Objects.equals(this.reporter, other.reporter); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ViolationConfig [reporter=" | ||
+ this.reporter | ||
+ ", parser=" | ||
+ this.parser | ||
+ ", folder=" | ||
+ this.folder | ||
+ ", pattern=" | ||
+ this.pattern | ||
+ "]"; | ||
} | ||
} |
Oops, something went wrong.