Package com.qulice.spi
Class Environment.Mock
java.lang.Object
com.qulice.spi.Environment.Mock
- All Implemented Interfaces:
Environment
- Enclosing interface:
- Environment
Mock of
Environment
.- Since:
- 0.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.qulice.spi.Environment
Environment.Mock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbasedir()
Get project's basedir.Get classloader for this project.Get list of paths in classpath.encoding()
Encoding for the files.boolean
Shall this item be excluded from report?List of exclude patterns for given checker.Returns the files matching the specified pattern.outdir()
Get directory where .class files are stored.Get parameter by name, and return default if it's not set.tempdir()
Get directory to keep temporary files in.With default classpath.withExcludes
(String excludes) With exclude patterns.With this file on board.With this file on board.With this param and its value.
-
Constructor Details
-
Mock
Public ctor.- Throws:
IOException
- If some IO problem
-
-
Method Details
-
withParam
With this param and its value.- Parameters:
name
- Param namevalue
- Param value- Returns:
- This object
-
withFile
With this file on board.- Parameters:
name
- File name related to basedircontent
- File content to write- Returns:
- This object
- Throws:
IOException
- If some IO problem
-
withFile
With this file on board.- Parameters:
name
- File name related to basedirbytes
- File content to write- Returns:
- This object
- Throws:
IOException
- If some IO problem
-
withExcludes
With exclude patterns.- Parameters:
excludes
- Exclude patterns- Returns:
- This object
-
withDefaultClasspath
With default classpath.- Returns:
- This object
-
basedir
Description copied from interface:Environment
Get project's basedir.- Specified by:
basedir
in interfaceEnvironment
- Returns:
- The directory
-
tempdir
Description copied from interface:Environment
Get directory to keep temporary files in.- Specified by:
tempdir
in interfaceEnvironment
- Returns:
- The directory
-
outdir
Description copied from interface:Environment
Get directory where .class files are stored.- Specified by:
outdir
in interfaceEnvironment
- Returns:
- The directory
-
param
Description copied from interface:Environment
Get parameter by name, and return default if it's not set.- Specified by:
param
in interfaceEnvironment
- Parameters:
name
- The name of parametervalue
- Default value to return as default- Returns:
- The value
-
classloader
Description copied from interface:Environment
Get classloader for this project.- Specified by:
classloader
in interfaceEnvironment
- Returns:
- The classloader
-
classpath
Description copied from interface:Environment
Get list of paths in classpath.- Specified by:
classpath
in interfaceEnvironment
- Returns:
- The collection of paths
-
files
Description copied from interface:Environment
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.
- Specified by:
files
in interfaceEnvironment
- Parameters:
pattern
- File name pattern.- Returns:
- Collection of files, matching the specified pattern.
-
exclude
Description copied from interface:Environment
Shall this item be excluded from report?- Specified by:
exclude
in interfaceEnvironment
- 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
Description copied from interface:Environment
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).- Specified by:
excludes
in interfaceEnvironment
- Parameters:
checker
- Name of the checker that is asking (pmd, codenarc ...)- Returns:
- Exclude patterns
-
encoding
Description copied from interface:Environment
Encoding for the files.- Specified by:
encoding
in interfaceEnvironment
- Returns:
- Source files charset
-