Search in sources :

Example 1 with DisconfCenterBaseModel

use of com.baidu.disconf.client.common.model.DisconfCenterBaseModel in project disconf by knightliao.

the class StaticScannerFileMgrImpl method getDisconfFiles.

/**
     * 获取配置文件数据
     */
private static List<DisconfCenterBaseModel> getDisconfFiles(ScanStaticModel scanModel) {
    List<DisconfCenterBaseModel> disconfCenterFiles = new ArrayList<DisconfCenterBaseModel>();
    Set<Class<?>> classSet = scanModel.getDisconfFileClassSet();
    for (Class<?> disconfFile : classSet) {
        Set<Method> methods = scanModel.getDisconfFileItemMap().get(disconfFile);
        if (methods == null) {
            continue;
        }
        DisconfCenterFile disconfCenterFile = transformScanFile(disconfFile, methods);
        disconfCenterFiles.add(disconfCenterFile);
    }
    return disconfCenterFiles;
}
Also used : ArrayList(java.util.ArrayList) DisconfCenterFile(com.baidu.disconf.client.common.model.DisconfCenterFile) DisconfCenterBaseModel(com.baidu.disconf.client.common.model.DisconfCenterBaseModel) Method(java.lang.reflect.Method)

Example 2 with DisconfCenterBaseModel

use of com.baidu.disconf.client.common.model.DisconfCenterBaseModel in project disconf by knightliao.

the class StaticScannerItemMgrImpl method getDisconfItems.

/**
     * 转换配置项
     */
private static List<DisconfCenterBaseModel> getDisconfItems(ScanStaticModel scanModel) {
    List<DisconfCenterBaseModel> disconfCenterItems = new ArrayList<DisconfCenterBaseModel>();
    Set<Method> methods = scanModel.getDisconfItemMethodSet();
    for (Method method : methods) {
        DisconfCenterItem disconfCenterItem = transformScanItem(method);
        if (disconfCenterItem != null) {
            disconfCenterItems.add(disconfCenterItem);
        }
    }
    return disconfCenterItems;
}
Also used : DisconfCenterItem(com.baidu.disconf.client.common.model.DisconfCenterItem) ArrayList(java.util.ArrayList) DisconfCenterBaseModel(com.baidu.disconf.client.common.model.DisconfCenterBaseModel) Method(java.lang.reflect.Method)

Example 3 with DisconfCenterBaseModel

use of com.baidu.disconf.client.common.model.DisconfCenterBaseModel in project disconf by knightliao.

the class StaticScannerNonAnnotationFileMgrImpl method scanData2Store.

/**
     *
     */
public static void scanData2Store(String fileName) {
    DisconfCenterBaseModel disconfCenterBaseModel = StaticScannerNonAnnotationFileMgrImpl.getDisconfCenterFile(fileName);
    DisconfStoreProcessorFactory.getDisconfStoreFileProcessor().transformScanData(disconfCenterBaseModel);
}
Also used : DisconfCenterBaseModel(com.baidu.disconf.client.common.model.DisconfCenterBaseModel)

Aggregations

DisconfCenterBaseModel (com.baidu.disconf.client.common.model.DisconfCenterBaseModel)3 Method (java.lang.reflect.Method)2 ArrayList (java.util.ArrayList)2 DisconfCenterFile (com.baidu.disconf.client.common.model.DisconfCenterFile)1 DisconfCenterItem (com.baidu.disconf.client.common.model.DisconfCenterItem)1