public class PropsData
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected boolean |
appendDuplicateProps
If set, duplicate props will be appended to the end, separated by comma.
|
protected java.util.HashMap<java.lang.String,PropsEntry> |
baseProperties |
protected PropsEntry |
first |
protected boolean |
ignoreMissingMacros
When set, missing macros will be replaces with an empty string.
|
protected PropsEntry |
last |
protected java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,PropsEntry>> |
profileProperties |
protected boolean |
skipEmptyProps
When set, empty properties will be skipped.
|
Modifier | Constructor and Description |
---|---|
|
PropsData() |
protected |
PropsData(java.util.HashMap<java.lang.String,PropsEntry> properties,
java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,PropsEntry>> profiles) |
Modifier and Type | Method and Description |
---|---|
PropsData |
clone() |
int |
countBaseProperties()
Counts base properties.
|
int |
countProfileProperties()
Counts profile properties.
|
java.util.Map |
extract(java.util.Map target,
java.lang.String[] profiles,
java.lang.String[] wildcardPatterns,
java.lang.String prefix)
Extracts props to target map.
|
protected void |
extractMap(java.util.Map target,
java.util.Map<java.lang.String,PropsEntry> map,
java.lang.String[] profiles,
java.lang.String[] wildcardPatterns,
java.lang.String prefix) |
PropsEntry |
getBaseProperty(java.lang.String key)
Returns base property or
null if it doesn't exist. |
PropsEntry |
getProfileProperty(java.lang.String profile,
java.lang.String key)
Returns profile property.
|
protected java.lang.String |
lookupValue(java.lang.String key,
java.lang.String... profiles)
Lookup props value through profiles and base properties.
|
protected void |
put(java.lang.String profile,
java.util.Map<java.lang.String,PropsEntry> map,
java.lang.String key,
java.lang.String value,
boolean append)
Puts key-value pair into the map, with respect of appending duplicate properties
|
void |
putBaseProperty(java.lang.String key,
java.lang.String value,
boolean append)
Adds base property.
|
void |
putProfileProperty(java.lang.String key,
java.lang.String value,
java.lang.String profile,
boolean append)
Adds profile property.
|
java.lang.String |
resolveMacros(java.lang.String value,
java.lang.String... profiles)
Resolves all macros in this props set.
|
protected final java.util.HashMap<java.lang.String,PropsEntry> baseProperties
protected final java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,PropsEntry>> profileProperties
protected PropsEntry first
protected PropsEntry last
protected boolean appendDuplicateProps
protected boolean ignoreMissingMacros
protected boolean skipEmptyProps
public PropsData()
protected PropsData(java.util.HashMap<java.lang.String,PropsEntry> properties, java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,PropsEntry>> profiles)
public PropsData clone()
clone
in class java.lang.Object
protected void put(java.lang.String profile, java.util.Map<java.lang.String,PropsEntry> map, java.lang.String key, java.lang.String value, boolean append)
public int countBaseProperties()
public void putBaseProperty(java.lang.String key, java.lang.String value, boolean append)
public PropsEntry getBaseProperty(java.lang.String key)
null
if it doesn't exist.public int countProfileProperties()
public void putProfileProperty(java.lang.String key, java.lang.String value, java.lang.String profile, boolean append)
public PropsEntry getProfileProperty(java.lang.String profile, java.lang.String key)
protected java.lang.String lookupValue(java.lang.String key, java.lang.String... profiles)
null
if value not found.public java.lang.String resolveMacros(java.lang.String value, java.lang.String... profiles)
public java.util.Map extract(java.util.Map target, java.lang.String[] profiles, java.lang.String[] wildcardPatterns, java.lang.String prefix)
protected void extractMap(java.util.Map target, java.util.Map<java.lang.String,PropsEntry> map, java.lang.String[] profiles, java.lang.String[] wildcardPatterns, java.lang.String prefix)
Copyright © 2003-present Jodd Team