Class ChainedPropertyUtil

    • Method Detail

      • getResolvedProperties

        public static Properties getResolvedProperties​(Properties properties)
                                                throws CheckstyleException
        Accepts user defined properties and returns new properties with all chained properties resolved.
        Parameters:
        properties - the underlying properties to use for property resolution.
        Returns:
        resolved properties
        Throws:
        CheckstyleException - when chained property is not defined
      • getPropertyNameFromExpression

        private static String getPropertyNameFromExpression​(String variableExpression)
        Gets an unresolved property name from a property variable expression by stripping the preceding '${' and trailing '}'.
        Parameters:
        variableExpression - the full property variable expression
        Returns:
        property name
      • allChainedPropertiesAreResolved

        private static boolean allChainedPropertiesAreResolved​(String propertyValue)
        Checks if all chained properties have been resolved. Essentially, this means that there exist no matches for PROPERTY_VARIABLE_PATTERN in the property value string.
        Parameters:
        propertyValue - the property value to check
        Returns:
        true if all chained properties are resolved