public final class ChainedPropertyUtil extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.regex.Pattern |
PROPERTY_VARIABLE_PATTERN
Property variable expression pattern, matches property variables such as
${basedir}. |
static java.lang.String |
UNDEFINED_PROPERTY_MESSAGE
Used to report undefined property in exception message.
|
| Modifier | Constructor and Description |
|---|---|
private |
ChainedPropertyUtil()
Prevent instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
allChainedPropertiesAreResolved(java.lang.String propertyValue)
Checks if all chained properties have been resolved.
|
private static java.lang.String |
getPropertyNameFromExpression(java.lang.String variableExpression)
Gets an unresolved property name from a property variable expression
by stripping the preceding '${' and trailing '}'.
|
static java.util.Properties |
getResolvedProperties(java.util.Properties properties)
Accepts user defined properties and returns new properties
with all chained properties resolved.
|
public static final java.lang.String UNDEFINED_PROPERTY_MESSAGE
private static final java.util.regex.Pattern PROPERTY_VARIABLE_PATTERN
${basedir}.private ChainedPropertyUtil()
public static java.util.Properties getResolvedProperties(java.util.Properties properties) throws CheckstyleException
properties - the underlying properties to use
for property resolution.CheckstyleException - when chained property is not definedprivate static java.lang.String getPropertyNameFromExpression(java.lang.String variableExpression)
variableExpression - the full property variable expressionprivate static boolean allChainedPropertiesAreResolved(java.lang.String propertyValue)
propertyValue - the property value to checkCopyright © 2001-2022. All Rights Reserved.