Java 类org.apache.commons.configuration2.ConfigurationConverter 实例源码

项目:yajsw    文件:FileUtils.java   
/**
 * The main method.
 * 
 * @param args
 *            the arguments
 */
public static void main(String[] args)
{
    System.out.println(getFiles(".", "z:\\dev\\yajsw\\..\\yajsw\\*.jar")
            .size());
    try
    {
        // String
        // fileName=FilenameUtils.separatorsToSystem("C:\\init\\MOBILEguard\\yajsw/lib/jvmstat/*.jar");
        // System.out.println("FileName: "+fileName);
        CompositeConfiguration compConfig = new CompositeConfiguration();
        AbstractConfiguration configuraton = new BaseConfiguration();
        compConfig.addConfiguration(new EnvironmentConfiguration());
        configuraton.setProperty("wrapper.java.classpath.1",
                "${VERSANT_ROOT}/lib/jvi.*jar");
        configuraton.setProperty("wrapper.java.classpath.2",
                "${GROOVY_HOME}/lib/*.jar");
        compConfig.addConfiguration(configuraton);
        System.out.println("Configuration: "
                + ConfigurationConverter.getProperties(compConfig));
        System.out.println("subset: "
                + ConfigurationConverter.getProperties(compConfig
                        .subset("wrapper.java")));

        // Collection files=FileUtils.getFiles("../..",
        // "C:/versant/7_0_1/lib/jvi*.jar");
        // Collection collection=
        // org.apache.commons.io.FileUtils.listFiles(new File("C:/"),
        // new WildcardFileFilter("jvi*.jar"), new
        // WildcardFileFilter("*jar"));
        // File[] files= new
        // File("C:").listFiles((FilenameFilter)FileFilterUtils.nameFileFilter("C:/versant/7_0_1/lib/jvi*.jar"));

        //
        // FileUtils.getFiles("C:/versant/7_0_1/lib/", "jvi*.jar");
        // System.out.println("FileList="+
        // FileUtils.getFiles("C:/versant/7_0_1/lib/", "jvi*.jar"));
        // java.util.Arrays.asList(files));
    }
    catch (Exception ex)
    {
        ex.printStackTrace();
    }
}
项目:swagger2markup    文件:Swagger2MarkupProperties.java   
public Swagger2MarkupProperties(Properties properties) {
    this(ConfigurationConverter.getConfiguration(properties));
}