Class PropertiesUtil
- java.lang.Object
-
- net.officefloor.compile.impl.properties.PropertiesUtil
-
public class PropertiesUtil extends java.lang.Object
Utility methods for working withProperty
instances.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copyPrefixedProperties(SourceProperties source, java.lang.String propertyPrefix, PropertyConfigurable target)
Copies allProperty
instances with the name prefix from theSourceProperties
to thePropertyConfigurable
.static void
copyPrefixedProperties(SourceProperties source, java.lang.String propertyPrefix, PropertyList target)
Copies allProperty
instances with the name prefix from theSourceProperties
to thePropertyConfigurable
.static void
copyProperties(SourceProperties source, PropertyConfigurable target, java.lang.String... propertyNames)
static void
copyProperties(SourceProperties source, PropertyList target, java.lang.String... propertyNames)
-
-
-
Method Detail
-
copyProperties
public static void copyProperties(SourceProperties source, PropertyConfigurable target, java.lang.String... propertyNames)
- Parameters:
source
-SourceProperties
.target
-PropertyConfigurable
.propertyNames
- Names of the properties to copy. If no names are provided, allProperty
instances are copied.
-
copyProperties
public static void copyProperties(SourceProperties source, PropertyList target, java.lang.String... propertyNames)
- Parameters:
source
-SourceProperties
.target
-PropertyList
.propertyNames
- Names of the properties to copy. If no names are provided, allProperty
instances are copied.
-
copyPrefixedProperties
public static void copyPrefixedProperties(SourceProperties source, java.lang.String propertyPrefix, PropertyConfigurable target)
Copies all
Property
instances with the name prefix from theSourceProperties
to thePropertyConfigurable
.This is useful for copying a list of properties that are identified by a prefix on the
Property
name.- Parameters:
source
-SourceProperties
.propertyPrefix
- Name prefix to identify theProperty
instances to copy.target
-PropertyConfigurable
.
-
copyPrefixedProperties
public static void copyPrefixedProperties(SourceProperties source, java.lang.String propertyPrefix, PropertyList target)
Copies all
Property
instances with the name prefix from theSourceProperties
to thePropertyConfigurable
.This is useful for copying a list of properties that are identified by a prefix on the
Property
name.- Parameters:
source
-SourceProperties
.propertyPrefix
- Name prefix to identify theProperty
instances to copy.target
-PropertyConfigurable
.
-
-