public final class CharacterSetEncodingRule extends Object implements org.apache.maven.enforcer.rule.api.EnforcerRule
| Constructor and Description |
|---|
CharacterSetEncodingRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper) |
String |
getCacheId()
If your rule is cacheable, you must return a unique id when parameters or conditions
change that would cause the result to be different.
|
String |
getDirectory()
Getters and setters for the parameters (these are filled by Maven).
|
String |
getExcludeRegex() |
Collection<com.github.mikkoi.maven.plugins.enforcer.rule.charsetencoding.FileResult> |
getFaultyFiles()
Get the faulty files list.
|
String |
getIncludeRegex() |
String |
getRequireEncoding() |
boolean |
isCacheable()
This tells the system if the results are cacheable at all.
|
boolean |
isResultValid(org.apache.maven.enforcer.rule.api.EnforcerRule arg0)
If the rule is cacheable and the same id is found in the cache, the stored results
are passed to this method to allow double checking of the results.
|
void |
setDirectory(String directory) |
void |
setExcludeRegex(String excludeRegex) |
void |
setIncludeRegex(String includeRegex) |
void |
setRequireEncoding(String requireEncoding) |
@Nonnull public Collection<com.github.mikkoi.maven.plugins.enforcer.rule.charsetencoding.FileResult> getFaultyFiles()
public void execute(@Nonnull org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper) throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
execute in interface org.apache.maven.enforcer.rule.api.EnforcerRulehelper - EnforcerRuleHelperorg.apache.maven.enforcer.rule.api.EnforcerRuleException - Throws when error@Nullable public String getCacheId()
The easiest way to do this is to return a hash computed from the values of your parameters.
If your rule is not cacheable, then the result here is not important, you may return anything.
getCacheId in interface org.apache.maven.enforcer.rule.api.EnforcerRulepublic boolean isCacheable()
isCacheable in interface org.apache.maven.enforcer.rule.api.EnforcerRulepublic boolean isResultValid(@Nullable org.apache.maven.enforcer.rule.api.EnforcerRule arg0)
isResultValid in interface org.apache.maven.enforcer.rule.api.EnforcerRulearg0 - EnforcerRule@Nullable public String getDirectory()
Copyright © 2016. All rights reserved.