Package org.spdx
Class Configuration
java.lang.Object
org.spdx.Configuration
The configuration class for the Spdx-Java-Library. When a caller attempts to retrieve a configuration property, it
will first be checked in the Java system properties (i.e. set via `-D` command line options to the JVM, or by
programmatic calls to `System.setProperty()` in code), and will then fallback on a properties file in the classpath.
That file must be called `/resources/spdx-java-library.properties`.
Please see the documentation for specifics on what configuration options Spdx-Java-Library supports, and how they
impact the library's behavior.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigurationgetProperty(String propertyName) getProperty(String propertyName, String defaultValue)
-
Method Details
-
getInstance
- Returns:
- The singleton instance of the Configuration class.
-
getProperty
- Parameters:
propertyName- The name of the configuration property to retrieve.- Returns:
- The value of the given property name, or null if it wasn't found.
-
getProperty
- Parameters:
propertyName- The name of the configuration property to retrieve.defaultValue- The default value to return, if the property isn't found.- Returns:
- The value of the given property name, or defaultValue if it wasn't found.
-