public final class ConfigUtils
extends java.lang.Object
Properties
. You can use
placeholders in the values, and they are replaced with environment variables
(${env:<environment variable name>}) or system properties (${sys:<system property
name>}). You can also specify default values in placeholders like ${sys:<system property
name>:-defaultValue}.Modifier and Type | Method and Description |
---|---|
static boolean |
getBoolean(java.util.Properties properties,
java.lang.String name,
boolean defaultValue) |
static java.lang.Boolean |
getBoolean(java.util.Properties properties,
java.lang.String name,
java.lang.Boolean defaultValue) |
static int |
getInt(java.util.Properties properties,
java.lang.String name,
int defaultValue) |
static java.lang.Integer |
getInt(java.util.Properties properties,
java.lang.String name,
java.lang.Integer defaultValue) |
static long |
getLong(java.util.Properties properties,
java.lang.String name,
long defaultValue) |
static java.lang.Long |
getLong(java.util.Properties properties,
java.lang.String name,
java.lang.Long defaultValue) |
static java.lang.String |
getString(java.util.Properties properties,
java.lang.String name,
java.lang.String defaultValue) |
static java.lang.String[] |
getStringArray(java.util.Properties properties,
java.lang.String name,
java.lang.String[] defaultValue) |
static java.lang.String |
getStringFromFilePath(java.util.Properties properties,
java.lang.String pathName,
java.lang.String defaultValue) |
@Nullable public static java.lang.String getString(java.util.Properties properties, java.lang.String name, @Nullable java.lang.String defaultValue)
public static int getInt(java.util.Properties properties, java.lang.String name, int defaultValue)
@Nullable public static java.lang.Integer getInt(java.util.Properties properties, java.lang.String name, @Nullable java.lang.Integer defaultValue)
public static long getLong(java.util.Properties properties, java.lang.String name, long defaultValue)
@Nullable public static java.lang.Long getLong(java.util.Properties properties, java.lang.String name, @Nullable java.lang.Long defaultValue)
public static boolean getBoolean(java.util.Properties properties, java.lang.String name, boolean defaultValue)
@Nullable public static java.lang.Boolean getBoolean(java.util.Properties properties, java.lang.String name, @Nullable java.lang.Boolean defaultValue)
@Nullable public static java.lang.String[] getStringArray(java.util.Properties properties, java.lang.String name, @Nullable java.lang.String[] defaultValue)
@Nullable public static java.lang.String getStringFromFilePath(java.util.Properties properties, java.lang.String pathName, @Nullable java.lang.String defaultValue)