diff options
Diffstat (limited to 'org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java')
-rw-r--r-- | org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java | 95 |
1 files changed, 48 insertions, 47 deletions
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java b/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java index 60f03c0a..2bf1b394 100644 --- a/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java +++ b/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.runtime; @@ -26,7 +27,7 @@ import java.util.regex.Pattern; /** * Utility to create and parse options for the runtime agent. Options are * represented as a string in the following format: - * + * * <pre> * key1=value1,key2=value2,key3=value3 * </pre> @@ -53,7 +54,7 @@ public final class AgentOptions { /** * Wildcard expression for class names that should be included for code * coverage. Default is <code>*</code> (all classes included). - * + * * @see WildcardMatcher */ public static final String INCLUDES = "includes"; @@ -61,7 +62,7 @@ public final class AgentOptions { /** * Wildcard expression for class names that should be excluded from code * coverage. Default is the empty string (no exclusions). - * + * * @see WildcardMatcher */ public static final String EXCLUDES = "excludes"; @@ -72,7 +73,7 @@ public final class AgentOptions { * loader which full qualified name matches this expression will be ignored * for code coverage regardless of all other filtering settings. Default is * <code>sun.reflect.DelegatingClassLoader</code>. - * + * * @see WildcardMatcher */ public static final String EXCLCLASSLOADER = "exclclassloader"; @@ -106,7 +107,7 @@ public final class AgentOptions { /** * Specifies the output mode. Default is {@link OutputMode#file}. - * + * * @see OutputMode#file * @see OutputMode#tcpserver * @see OutputMode#tcpclient @@ -204,7 +205,7 @@ public final class AgentOptions { /** * New instance parsed from the given option string. - * + * * @param optionstr * string to parse or <code>null</code> */ @@ -219,8 +220,8 @@ public final class AgentOptions { } final String key = entry.substring(0, pos); if (!VALID_OPTIONS.contains(key)) { - throw new IllegalArgumentException(format( - "Unknown agent option \"%s\".", key)); + throw new IllegalArgumentException( + format("Unknown agent option \"%s\".", key)); } final String value = entry.substring(pos + 1); @@ -233,7 +234,7 @@ public final class AgentOptions { /** * New instance read from the given {@link Properties} object. - * + * * @param properties * {@link Properties} object to read configuration options from */ @@ -260,7 +261,7 @@ public final class AgentOptions { /** * Returns the output file location. - * + * * @return output file location */ public String getDestfile() { @@ -269,7 +270,7 @@ public final class AgentOptions { /** * Sets the output file location. - * + * * @param destfile * output file location */ @@ -279,7 +280,7 @@ public final class AgentOptions { /** * Returns whether the output should be appended to an existing file. - * + * * @return <code>true</code>, when the output should be appended */ public boolean getAppend() { @@ -288,7 +289,7 @@ public final class AgentOptions { /** * Sets whether the output should be appended to an existing file. - * + * * @param append * <code>true</code>, when the output should be appended */ @@ -298,7 +299,7 @@ public final class AgentOptions { /** * Returns the wildcard expression for classes to include. - * + * * @return wildcard expression for classes to include * @see WildcardMatcher */ @@ -308,7 +309,7 @@ public final class AgentOptions { /** * Sets the wildcard expression for classes to include. - * + * * @param includes * wildcard expression for classes to include * @see WildcardMatcher @@ -319,7 +320,7 @@ public final class AgentOptions { /** * Returns the wildcard expression for classes to exclude. - * + * * @return wildcard expression for classes to exclude * @see WildcardMatcher */ @@ -329,7 +330,7 @@ public final class AgentOptions { /** * Sets the wildcard expression for classes to exclude. - * + * * @param excludes * wildcard expression for classes to exclude * @see WildcardMatcher @@ -340,7 +341,7 @@ public final class AgentOptions { /** * Returns the wildcard expression for excluded class loaders. - * + * * @return expression for excluded class loaders * @see WildcardMatcher */ @@ -350,7 +351,7 @@ public final class AgentOptions { /** * Sets the wildcard expression for excluded class loaders. - * + * * @param expression * expression for excluded class loaders * @see WildcardMatcher @@ -362,7 +363,7 @@ public final class AgentOptions { /** * Returns whether classes from the bootstrap classloader should be * instrumented. - * + * * @return <code>true</code> if classes from the bootstrap classloader * should be instrumented */ @@ -373,7 +374,7 @@ public final class AgentOptions { /** * Sets whether classes from the bootstrap classloader should be * instrumented. - * + * * @param include * <code>true</code> if bootstrap classes should be instrumented */ @@ -383,7 +384,7 @@ public final class AgentOptions { /** * Returns whether classes without source location should be instrumented. - * + * * @return <code>true</code> if classes without source location should be * instrumented */ @@ -393,7 +394,7 @@ public final class AgentOptions { /** * Sets whether classes without source location should be instrumented. - * + * * @param include * <code>true</code> if classes without source location should be * instrumented @@ -404,7 +405,7 @@ public final class AgentOptions { /** * Returns the session identifier. - * + * * @return session identifier */ public String getSessionId() { @@ -413,7 +414,7 @@ public final class AgentOptions { /** * Sets the session identifier. - * + * * @param id * session identifier */ @@ -423,7 +424,7 @@ public final class AgentOptions { /** * Returns whether coverage data should be dumped on exit. - * + * * @return <code>true</code> if coverage data will be written on VM exit */ public boolean getDumpOnExit() { @@ -432,7 +433,7 @@ public final class AgentOptions { /** * Sets whether coverage data should be dumped on exit. - * + * * @param dumpOnExit * <code>true</code> if coverage data should be written on VM * exit @@ -445,7 +446,7 @@ public final class AgentOptions { * Returns the port on which to listen to when the output is * <code>tcpserver</code> or the port to connect to when output is * <code>tcpclient</code>. - * + * * @return port to listen on or connect to */ public int getPort() { @@ -455,7 +456,7 @@ public final class AgentOptions { /** * Sets the port on which to listen to when output is <code>tcpserver</code> * or the port to connect to when output is <code>tcpclient</code> - * + * * @param port * port to listen on or connect to */ @@ -468,7 +469,7 @@ public final class AgentOptions { * Gets the hostname or IP address to listen to when output is * <code>tcpserver</code> or connect to when output is * <code>tcpclient</code> - * + * * @return Hostname or IP address */ public String getAddress() { @@ -479,7 +480,7 @@ public final class AgentOptions { * Sets the hostname or IP address to listen to when output is * <code>tcpserver</code> or connect to when output is * <code>tcpclient</code> - * + * * @param address * Hostname or IP address */ @@ -489,7 +490,7 @@ public final class AgentOptions { /** * Returns the output mode - * + * * @return current output mode */ public OutputMode getOutput() { @@ -502,7 +503,7 @@ public final class AgentOptions { /** * Sets the output mode - * + * * @param output * Output mode */ @@ -512,7 +513,7 @@ public final class AgentOptions { /** * Sets the output mode - * + * * @param output * Output mode */ @@ -523,7 +524,7 @@ public final class AgentOptions { /** * Returns the location of the directory where class files should be dumped * to. - * + * * @return dump location or <code>null</code> (no dumps) */ public String getClassDumpDir() { @@ -532,7 +533,7 @@ public final class AgentOptions { /** * Sets the directory where class files should be dumped to. - * + * * @param location * dump location or <code>null</code> (no dumps) */ @@ -542,7 +543,7 @@ public final class AgentOptions { /** * Returns whether the agent exposes functionality via JMX. - * + * * @return <code>true</code>, when JMX is enabled */ public boolean getJmx() { @@ -551,7 +552,7 @@ public final class AgentOptions { /** * Sets whether the agent should expose functionality via JMX. - * + * * @param jmx * <code>true</code> if JMX should be enabled */ @@ -589,7 +590,7 @@ public final class AgentOptions { /** * Generate required JVM argument based on current configuration and * supplied agent jar location. - * + * * @param agentJarFile * location of the JaCoCo Agent Jar * @return Argument to pass to create new VM with coverage enabled @@ -601,7 +602,7 @@ public final class AgentOptions { /** * Generate required quoted JVM argument based on current configuration and * supplied agent jar location. - * + * * @param agentJarFile * location of the JaCoCo Agent Jar * @return Quoted argument to pass to create new VM with coverage enabled @@ -615,7 +616,7 @@ public final class AgentOptions { * prepends it to the given argument command line. If a agent with the same * JAR file is already specified this parameter is removed from the existing * command line. - * + * * @param arguments * existing command line arguments or <code>null</code> * @param agentJarFile |