@BeanIgnore public class ConfigEvent extends Object
Modifier and Type | Method and Description |
---|---|
String |
getComment()
Returns the entry comment.
|
String |
getConfig()
Returns the configuration name.
|
String |
getKey()
Returns the entry name.
|
String |
getModifiers()
Returns the modifiers on this entry.
|
List<String> |
getPreLines()
Returns the section or entry lines.
|
String |
getSection()
Returns the section name.
|
ConfigEventType |
getType()
Returns the event type.
|
String |
getValue()
Returns the entry value.
|
static ConfigEvent |
removeEntry(String config,
String section,
String key)
Removes a value from a configuration.
|
static ConfigEvent |
removeSection(String config,
String section)
Removes a section from the config.
|
static ConfigEvent |
setEntry(String config,
String section,
String key,
String value,
String modifiers,
String comment,
List<String> prelines)
Sets or replaces a value in a configuration.
|
static ConfigEvent |
setSection(String config,
String section,
List<String> prelines)
Adds a new empty section to the config.
|
String |
toString() |
public static ConfigEvent setEntry(String config, String section, String key, String value, String modifiers, String comment, List<String> prelines)
config
- The configuration name.section
- The section name.
key
- The entry name.
value
- The entry value.
comment
- Optional comment string to add on the same line as the entry.modifiers
- Optional entry modifiers.prelines
- Comment lines that occur before this entry.
ConfigEvent
object.public static ConfigEvent removeEntry(String config, String section, String key)
config
- The configuration name.section
- The section name.
key
- The entry name.
ConfigEvent
object.public static ConfigEvent setSection(String config, String section, List<String> prelines)
config
- The configuration name.section
- The section name.prelines
- Comment lines that occur before this section.
ConfigEvent
object.public static ConfigEvent removeSection(String config, String section)
config
- The configuration name.section
- The section name.ConfigEvent
object.public ConfigEventType getType()
public String getConfig()
public String getSection()
public String getComment()
public List<String> getPreLines()
public String getModifiers()
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.