@Plugin(name="property", category="Core", printObject=true) public final class Property extends Object
Modifier and Type | Field and Description |
---|---|
static Property[] |
EMPTY_ARRAY |
Modifier and Type | Method and Description |
---|---|
static Property |
createProperty(String name,
String value)
Creates a Property.
|
static Property |
createProperty(String name,
String rawValue,
Configuration configuration)
Creates a Property.
|
static Property |
createProperty(String name,
String rawValue,
String value)
Creates a Property.
|
String |
evaluate(StrSubstitutor substitutor)
Evaluate this property with the provided substitutor.
|
String |
getName()
Returns the property name.
|
String |
getRawValue()
Returns the original raw property value without substitution.
|
String |
getValue()
Returns the property value.
|
boolean |
isValueNeedsLookup()
Returns
true if the value contains a substitutable property that requires a lookup to be resolved. |
String |
toString() |
public static final Property[] EMPTY_ARRAY
public String getName()
public String getRawValue()
public String getValue()
public boolean isValueNeedsLookup()
true
if the value contains a substitutable property that requires a lookup to be resolved.true
if the value contains "${"}, {@code false} otherwisepublic String evaluate(StrSubstitutor substitutor)
isValueNeedsLookup()
is false
,
the value
is returned, otherwise the raw value
is evaluated
with the given substitutor.public static Property createProperty(String name, String value)
name
- The key.value
- The value.public static Property createProperty(String name, String rawValue, String value)
name
- The key.rawValue
- The value without any substitution applied.value
- The value.@PluginFactory public static Property createProperty(@PluginAttribute(value="name") String name, @PluginValue(value="value",substitute=false) String rawValue, @PluginConfiguration Configuration configuration)
name
- The key.rawValue
- The value without any substitution applied.configuration
- configuration used to resolve the property value from the rawValue Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.