Package com.qulice.spi
Interface Environment
-
- All Known Implementing Classes:
Environment.Mock
public interface Environment
Environment.- Since:
- 0.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Environment.Mock
Mock ofEnvironment
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description File
basedir()
Get project's basedir.ClassLoader
classloader()
Get classloader for this project.Collection<String>
classpath()
Get list of paths in classpath.Charset
encoding()
Encoding for the files.boolean
exclude(String check, String name)
Shall this item be excluded from report?Collection<String>
excludes(String checker)
List of exclude patterns for given checker.Collection<File>
files(String pattern)
Returns the files matching the specified pattern.File
outdir()
Get directory where .class files are stored.String
param(String name, String value)
Get parameter by name, and return default if it's not set.File
tempdir()
Get directory to keep temporary files in.
-
-
-
Method Detail
-
basedir
File basedir()
Get project's basedir.- Returns:
- The directory
-
tempdir
File tempdir()
Get directory to keep temporary files in.- Returns:
- The directory
-
outdir
File outdir()
Get directory where .class files are stored.- Returns:
- The directory
-
param
String param(String name, String value)
Get parameter by name, and return default if it's not set.- Parameters:
name
- The name of parametervalue
- Default value to return as default- Returns:
- The value
-
classloader
ClassLoader classloader()
Get classloader for this project.- Returns:
- The classloader
-
classpath
Collection<String> classpath()
Get list of paths in classpath.- Returns:
- The collection of paths
-
files
Collection<File> files(String pattern)
Returns the files matching the specified pattern.The pattern matching scheme used is wildcard matching. The characters '?' and '*' represents single or multiple wildcard characters, respectively. Pattern matching is case sensitive.
- Parameters:
pattern
- File name pattern.- Returns:
- Collection of files, matching the specified pattern.
-
exclude
boolean exclude(String check, String name)
Shall this item be excluded from report?- Parameters:
check
- Name of the check that is askingname
- File or any other item, which is subject of validation- Returns:
- TRUE if it should be ignored
-
excludes
Collection<String> excludes(String checker)
List of exclude patterns for given checker. Each list element will contain exactly one exclude pattern which, depending on the plugin that uses the excludes might be either wildcard (CodeNarc) pattern or regex pattern (FindBugs).- Parameters:
checker
- Name of the checker that is asking (pmd, codenarc ...)- Returns:
- Exclude patterns
-
encoding
Charset encoding()
Encoding for the files.- Returns:
- Source files charset
-
-