Top Constructors Methods
org.codehaus.commons.compiler.util

public final Class SystemProperties

extends Object
Class Inheritance
Imports
org.codehaus.commons.nullanalysis.Nullable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

Whether the class property is set and its value equals, ignoring case, "true"
getBooleanClassProperty
(Class<?> targetClass, String classPropertyName)

public static boolean

Returns:

Whether the value of the class property its value equals, ignoring case, "true", or, if that class property is not set, defaultValue
getBooleanClassProperty
(Class<?> targetClass, String classPropertyName, boolean defaultValue)

public static String

Returns:

The value of the class property, or, if that class property is not set, null
getClassProperty
(Class<?> targetClass, String classPropertyName)

public static String

Returns:

The value of the class property, or, if that class property is not set, defaultValue
getClassProperty
(Class<?> targetClass, String classPropertyName, String defaultValue)

Gets the value of a "class property".

public static int

Returns:

The value of the class property, converted to integer, or, if that class property is not set, defaultValue
getIntegerClassProperty
(Class<?> targetClass, String classPropertyName, int defaultValue)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SystemPropertiesback to summary
private SystemProperties()

Method Detail

getBooleanClassPropertyback to summary
public static boolean getBooleanClassProperty(Class<?> targetClass, String classPropertyName)
Returns:boolean

Whether the class property is set and its value equals, ignoring case, "true"

See Also
getClassProperty(Class, String, String)
getBooleanClassPropertyback to summary
public static boolean getBooleanClassProperty(Class<?> targetClass, String classPropertyName, boolean defaultValue)
Returns:boolean

Whether the value of the class property its value equals, ignoring case, "true", or, if that class property is not set, defaultValue

See Also
getClassProperty(Class, String, String)
getClassPropertyback to summary
public static String getClassProperty(Class<?> targetClass, String classPropertyName)
Returns:String

The value of the class property, or, if that class property is not set, null

Annotations
@Nullable
See Also
getClassProperty(Class, String, String)
getClassPropertyback to summary
public static String getClassProperty(Class<?> targetClass, String classPropertyName, String defaultValue)

Gets the value of a "class property".

A class property is configured by a set of system properties (decreasing priority):

  • fully-qualified-name-of-targetClass.classPropertyName
  • simple-name-of-targetClass.classPropertyName
Returns:String

The value of the class property, or, if that class property is not set, defaultValue

Annotations
@Nullable
getIntegerClassPropertyback to summary
public static int getIntegerClassProperty(Class<?> targetClass, String classPropertyName, int defaultValue)
Returns:int

The value of the class property, converted to integer, or, if that class property is not set, defaultValue

Exceptions
NumberFormatException:
The value of the class property could be parsed as an integer
See Also
getClassProperty(Class, String, String), Integer#parseInt(String)