com.datastax.insight.core.conf.Components Maven / Gradle / Ivy
The newest version!
package com.datastax.insight.core.conf;
import com.alibaba.fastjson.TypeReference;
import com.datastax.util.io.FileUtil;
import com.datastax.util.web.JSONUtil;
import java.util.List;
public class Components {
private static List components;
private static void loadComponents(){
String json= FileUtil.readFileString("/component-mapper.json");
components= JSONUtil.getEntity(json,new TypeReference>(){});
}
public static List getComponents(){
return components;
}
public static void setComponents(List cList){
components=cList;
}
public static void main(String[] args){
List components= Components.getComponents();
System.out.println(components.size());
}
}