@Ignored public interface IConfigFileParser
Modifier and Type | Interface and Description |
---|---|
static class |
IConfigFileParser.Attribute |
static class |
IConfigFileParser.Category |
static class |
IConfigFileParser.Property |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CATEGORY_NAME |
static String |
TAG_NAME_ATTRIBUTES |
static String |
TAG_NAME_CATEGORIES |
static String |
TAG_NAME_CATEGORY |
static String |
TAG_NAME_ITEM |
static String |
TAG_NAME_PROPERTIES |
static String |
TAG_NAME_PROPERTY |
static String |
TAG_NAME_VALUE |
Modifier and Type | Method and Description |
---|---|
IConfigFileParser.Attribute |
getAttribute(String key)
获取指定键的属性对象
|
Map<String,IConfigFileParser.Attribute> |
getAttributes()
获取全部属性映射
|
Map<String,IConfigFileParser.Category> |
getCategories()
获取全部分类映射
|
IConfigFileParser.Category |
getCategory(String name)
获取指定名称的分类
|
IConfigFileParser.Category |
getDefaultCategory()
获取默认分类对象
|
IConfigFileParser |
load(boolean sorted)
开始分析配置文件
|
IJsonObjectWrapper |
toJson()
输出为JSON对象
|
void |
writeTo(File targetFile)
将配置文件内容写入到目标文件
|
void |
writeTo(OutputStream outputStream)
将配置文件内容写入到输出流
|
static final String DEFAULT_CATEGORY_NAME
static final String TAG_NAME_PROPERTIES
static final String TAG_NAME_CATEGORY
static final String TAG_NAME_PROPERTY
static final String TAG_NAME_ITEM
static final String TAG_NAME_VALUE
static final String TAG_NAME_CATEGORIES
static final String TAG_NAME_ATTRIBUTES
IConfigFileParser load(boolean sorted)
sorted
- 是否保证顺序void writeTo(File targetFile) throws IOException
targetFile
- 目标文件IOException
- 可能产生的IO异常void writeTo(OutputStream outputStream) throws IOException
outputStream
- 目标输出流IOException
- 可能产生的IO异常IConfigFileParser.Attribute getAttribute(String key)
key
- 属性键Map<String,IConfigFileParser.Attribute> getAttributes()
IConfigFileParser.Category getDefaultCategory()
IConfigFileParser.Category getCategory(String name)
name
- 分类名称Map<String,IConfigFileParser.Category> getCategories()
IJsonObjectWrapper toJson()
Copyright © 2022. All rights reserved.