public final class AgentConfigs extends Object
key1=value1,key2=value2,key3=value3DISCLAIMER: this class has been exported from JaCoCo's core module (originally called
org.jacoco.core.runtime.AgentOptions) and augmented. In here, it would be desirable
to extend JaCoCo's class (using the extends keyword) rather than including a very
similar one, however JaCoCo's class is final (as all it's fields) and therefore cannot be
extended/augmented.| Modifier and Type | Field and Description |
|---|---|
static String |
BUILDLOCATION_KEY |
static String |
DEFAULT_BUILDLOCATION |
static String |
DEFAULT_DESTFILE
Default value for the "destfile" agent configuration.
|
static String |
DEFAULT_EXCLCLASSLOADER |
static String |
DEFAULT_EXCLUDES |
static GranularityLevel |
DEFAULT_GRANULARITY |
static boolean |
DEFAULT_INCLDEPRECATEDMETHODS |
static boolean |
DEFAULT_INCLNOLOCATIONCLASSES |
static boolean |
DEFAULT_INCLPUBLICMETHODS |
static boolean |
DEFAULT_INCLSTATICCONSTRUCTORS |
static String |
DEFAULT_INCLUDES |
static InstrumentationLevel |
DEFAULT_INSTRUMENTATION_LEVEL |
static AgentOutput |
DEFAULT_OUTPUT |
static String |
DESTFILE_KEY
Specifies the output file for execution data.
|
static String |
EXCLCLASSLOADER_KEY
Wildcard expression for class loaders names for classes that should be excluded from code
coverage.
|
static String |
EXCLUDES_KEY
Wildcard expression for class names that should be excluded from code coverage.
|
static String |
GRANULARITY_KEY
Specifies the granularity level of instrumentation.
|
static String |
INCLDEPRECATEDMETHODS_KEY
Specifies whether methods annotated with @deprecated of each class under test should be
instrumented.
|
static String |
INCLNOLOCATIONCLASSES_KEY
Specifies whether also classes without a source location should be instrumented.
|
static String |
INCLPUBLICMETHODS_KEY
Specifies whether public methods of each class under test should be instrumented.
|
static String |
INCLSTATICCONSTRUCTORS_KEY
Specifies whether public static constructors of each class under test should be instrumented.
|
static String |
INCLUDES_KEY
Wildcard expression for class names that should be included for code coverage.
|
static String |
INSTRUMENTATION_LEVEL_KEY
Specifies which level of instrumentation should be performed.
|
static String |
OUTPUT_KEY
Specifies the output mode.
|
| Constructor and Description |
|---|
AgentConfigs()
New instance with all values set to default.
|
AgentConfigs(Properties properties)
New instance read from the given
Properties object. |
AgentConfigs(String agentConfigs)
New instance parsed from the given configuration string.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBuildLocation()
Returns the build location.
|
String |
getDestfile()
Returns the output file location.
|
String |
getExclClassloader()
Returns the wildcard expression for excluded class loaders.
|
String |
getExcludes()
Returns the wildcard expression for classes to exclude.
|
GranularityLevel |
getGranularity()
Returns the granularity level
|
Boolean |
getInclDeprecatedMethods()
Returns whether methods annotated with @deprecated should be instrumented.
|
boolean |
getInclNoLocationClasses()
Returns whether classes without source location should be instrumented.
|
Boolean |
getInclPublicMethods()
Returns whether public methods should be instrumented.
|
Boolean |
getInclStaticConstructors()
Returns whether public static constructors should be instrumented.
|
String |
getIncludes()
Returns the wildcard expression for classes to include.
|
InstrumentationLevel |
getInstrumentationLevel()
Returns which instrumentation level should be performed.
|
AgentOutput |
getOutput()
Returns the output mode
|
String |
getQuotedVMArgument(File agentJarFile)
Generate required quoted JVM argument based on current configuration and supplied agent jar
location.
|
String |
getVMArgument(File agentJarFile)
Generate required JVM argument based on current configuration and supplied agent jar location.
|
String |
prependVMArguments(String arguments,
File agentJarFile)
Generate required quotes JVM argument based on current configuration and prepends it to the
given argument command line.
|
void |
setBuildLocation(String buildLocation)
Set the build location.
|
void |
setDestfile(String destfile)
Sets the output file location.
|
void |
setExclClassloader(String expression)
Sets the wildcard expression for excluded class loaders.
|
void |
setExcludes(String excludes)
Sets the wildcard expression for classes to exclude.
|
void |
setGranularity(GranularityLevel granularity)
Sets the granularity level
|
void |
setGranularity(String granularity)
Sets the granularity level
|
void |
setInclDeprecatedMethods(boolean inclDeprecatedMethods)
Sets whether methods annotated with @deprecated should be instrumented.
|
void |
setInclNoLocationClasses(boolean include)
Sets whether classes without source location should be instrumented.
|
void |
setInclPublicMethods(boolean inclPublicMethods)
Sets whether public methods should be instrumented.
|
void |
setInclStaticConstructors(boolean inclStaticConstructors)
Sets whether public static constructors should be instrumented.
|
void |
setIncludes(String includes)
Sets the wildcard expression for classes to include.
|
void |
setInstrumentationLevel(InstrumentationLevel instrumentationLevel)
Sets which instrumentation level should be performed.
|
void |
setInstrumentationLevel(String instrumentationLevel)
Sets which instrumentation level should be performed.
|
void |
setOutput(AgentOutput output)
Sets the output mode
|
void |
setOutput(String output)
Sets the output mode
|
String |
toString()
Creates a string representation that can be passed to the agent via the command line.
|
public static final String BUILDLOCATION_KEY
public static final String DEFAULT_BUILDLOCATION
public static final String DESTFILE_KEY
gzoltar.ser in the
working directory.public static final String DEFAULT_DESTFILE
public static final String INCLUDES_KEY
* (all classes included).public static final String DEFAULT_INCLUDES
public static final String EXCLUDES_KEY
public static final String DEFAULT_EXCLUDES
public static final String EXCLCLASSLOADER_KEY
sun.reflect.DelegatingClassLoader.public static final String DEFAULT_EXCLCLASSLOADER
public static final String INCLNOLOCATIONCLASSES_KEY
false.public static final boolean DEFAULT_INCLNOLOCATIONCLASSES
public static final String OUTPUT_KEY
OutputMode#file.OutputMode#file,
OutputMode#console,
OutputMode#none,
Constant Field Valuespublic static final AgentOutput DEFAULT_OUTPUT
public static final String GRANULARITY_KEY
GranularityLevel#line.public static final GranularityLevel DEFAULT_GRANULARITY
public static final String INCLPUBLICMETHODS_KEY
true.public static final boolean DEFAULT_INCLPUBLICMETHODS
public static final String INCLSTATICCONSTRUCTORS_KEY
true.public static final boolean DEFAULT_INCLSTATICCONSTRUCTORS
public static final String INCLDEPRECATEDMETHODS_KEY
true.public static final boolean DEFAULT_INCLDEPRECATEDMETHODS
public static final String INSTRUMENTATION_LEVEL_KEY
full.public static final InstrumentationLevel DEFAULT_INSTRUMENTATION_LEVEL
public AgentConfigs()
public AgentConfigs(String agentConfigs)
agentConfigs - string to parse or nullpublic AgentConfigs(Properties properties)
Properties object.properties - Properties object to read configuration options frompublic String getBuildLocation()
public void setBuildLocation(String buildLocation)
buildLocation - directory locationpublic String getDestfile()
public void setDestfile(String destfile)
destfile - output file locationpublic String getIncludes()
public void setIncludes(String includes)
includes - wildcard expression for classes to includepublic String getExcludes()
public void setExcludes(String excludes)
excludes - wildcard expression for classes to excludepublic String getExclClassloader()
public void setExclClassloader(String expression)
expression - expression for excluded class loaderspublic boolean getInclNoLocationClasses()
true if classes without source location should be instrumentedpublic void setInclNoLocationClasses(boolean include)
include - true if classes without source location should be instrumentedpublic AgentOutput getOutput()
public void setOutput(String output)
output - Output modepublic void setOutput(AgentOutput output)
output - Output modepublic GranularityLevel getGranularity()
public void setGranularity(String granularity)
granularity - Granularity levelpublic void setGranularity(GranularityLevel granularity)
granularity - Granularity levelpublic Boolean getInclPublicMethods()
true if public methods should be instrumentedpublic void setInclPublicMethods(boolean inclPublicMethods)
inclPublicMethods - true if public methods should be instrumentedpublic Boolean getInclStaticConstructors()
true if public static constructors should be instrumentedpublic void setInclStaticConstructors(boolean inclStaticConstructors)
inclPublicMethods - true if public static constructors should be instrumentedpublic Boolean getInclDeprecatedMethods()
true if methods annotated with @deprecated should be instrumentedpublic void setInclDeprecatedMethods(boolean inclDeprecatedMethods)
inclDeprecatedMethods - true if methods annotated with @deprecated should be
instrumentedpublic InstrumentationLevel getInstrumentationLevel()
public void setInstrumentationLevel(String instrumentationLevel)
instrumentationLevel - public void setInstrumentationLevel(InstrumentationLevel instrumentationLevel)
instrumentationLevel - public String getVMArgument(File agentJarFile)
agentJarFile - location of the GZoltar Agent Jarpublic String getQuotedVMArgument(File agentJarFile)
agentJarFile - location of the GZoltar Agent Jarpublic String prependVMArguments(String arguments, File agentJarFile)
arguments - existing command line arguments or nullagentJarFile - location of the GZoltar Agent JarCopyright © 2010–2019 GZoltar. All rights reserved.