public final class Configuration
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Configuration |
create(java.nio.file.Path path)
Reads a configuration from a file.
|
static Configuration |
create(java.io.Reader reader)
Reads a configuration from a character stream.
|
static Configuration |
getConfiguration(java.lang.String name)
Returns a predefined configuration.
|
static java.util.List<Configuration> |
getConfigurations()
Returns an immutable list of predefined configurations for this Java Virtual Machine (JVM).
|
java.lang.String |
getContents()
Returns a textual representation of the configuration (for example, the
contents of a JFC file).
|
java.lang.String |
getDescription()
Returns a short sentence that describes the configuration (for example
"Low
overhead configuration safe for continuous use in production
environments") |
java.lang.String |
getLabel()
Returns a human-readable name (for example,
"Continuous" or "Profiling"}. |
java.lang.String |
getName()
Returns an identifying name (for example,
"default" or "profile"). |
java.lang.String |
getProvider()
Returns who created the configuration (for example
"OpenJDK"). |
java.util.Map<java.lang.String,java.lang.String> |
getSettings()
Returns the settings that specifies how a recording is configured.
|
public java.util.Map<java.lang.String,java.lang.String> getSettings()
Modifying the returned Map object doesn't change the
configuration.
nullpublic java.lang.String getName()
"default" or "profile").null if it doesn't existpublic java.lang.String getLabel()
"Continuous" or "Profiling"}.null if it doesn't existpublic java.lang.String getDescription()
"Low
overhead configuration safe for continuous use in production
environments")null if it doesn't existpublic java.lang.String getProvider()
"OpenJDK").null if it doesn't existpublic java.lang.String getContents()
null if it doesn't existgetContents()public static Configuration create(java.nio.file.Path path) throws java.io.IOException, java.text.ParseException
path - the file that contains the configuration, not nullConfiguration, not nulljava.text.ParseException - if the file can't be parsedjava.io.IOException - if the file can't be readjava.lang.SecurityException - if a security manager exists and its
checkRead method denies read access to the file.File.getPath(),
SecurityManager.checkRead(java.lang.String)public static Configuration create(java.io.Reader reader) throws java.io.IOException, java.text.ParseException
reader - a Reader that provides the configuration contents, not
nullnulljava.io.IOException - if an I/O error occurs while trying to read contents
from the Readerjava.text.ParseException - if the file can't be parsedpublic static Configuration getConfiguration(java.lang.String name) throws java.io.IOException, java.text.ParseException
See getConfigurations() for available configuration
names.
name - the name of the configuration (for example, "default" or
"profile")nulljava.io.IOException - if a configuration with the given name does not
exist, or if an I/O error occurs while reading the
configuration filejava.text.ParseException - if the configuration file can't be parsedpublic static java.util.List<Configuration> getConfigurations()
null