Java 类org.gradle.api.resources.TextResource 实例源码

项目:Reer    文件:FindBugsExtension.java   
/**
 * The filename of a filter specifying which bugs are reported.
 */
public File getIncludeFilter() {
    TextResource includeFilterConfig = getIncludeFilterConfig();
    if (includeFilterConfig == null) {
        return null;
    }
    return includeFilterConfig.asFile();
}
项目:Reer    文件:FindBugsExtension.java   
/**
 * The filename of a filter specifying bugs to exclude from being reported.
 */
public File getExcludeFilter() {
    TextResource excludeFilterConfig = getExcludeFilterConfig();
    if (excludeFilterConfig == null) {
        return null;
    }
    return excludeFilterConfig.asFile();
}
项目:Reer    文件:FindBugsExtension.java   
/**
 * The filename of a filter specifying baseline bugs to exclude from being reported.
 */
public File getExcludeBugsFilter() {
    TextResource excludeBugsFilterConfig = getExcludeBugsFilterConfig();
    if (excludeBugsFilterConfig == null) {
        return null;
    }
    return excludeBugsFilterConfig.asFile();
}
项目:Reer    文件:CheckstylePlugin.java   
private void configureTaskConventionMapping(Configuration configuration, Checkstyle task) {
    ConventionMapping taskMapping = task.getConventionMapping();
    taskMapping.map("checkstyleClasspath", Callables.returning(configuration));
    taskMapping.map("config", new Callable<TextResource>() {
        @Override
        public TextResource call() {
            return extension.getConfig();
        }
    });
    taskMapping.map("configProperties", new Callable<Map<String, Object>>() {
        @Override
        public Map<String, Object> call() {
            return extension.getConfigProperties();
        }
    });
    taskMapping.map("ignoreFailures", new Callable<Boolean>() {
        @Override
        public Boolean call() {
            return extension.isIgnoreFailures();
        }
    });
    taskMapping.map("showViolations", new Callable<Boolean>() {
        @Override
        public Boolean call() {
            return extension.isShowViolations();
        }
    });
}
项目:Reer    文件:FindBugs.java   
/**
 * A filter specifying which bugs are reported. Replaces the {@code includeFilter} property.
 *
 * @since 2.2
 */
@Incubating
@Nested
@Optional
public TextResource getIncludeFilterConfig() {
    return includeFilterConfig;
}
项目:Reer    文件:FindBugs.java   
/**
 * A filter specifying bugs to exclude from being reported. Replaces the {@code excludeFilter} property.
 *
 * @since 2.2
 */
@Incubating
@Nested
@Optional
public TextResource getExcludeFilterConfig() {
    return excludeFilterConfig;
}
项目:Reer    文件:FindBugs.java   
/**
 * A filter specifying baseline bugs to exclude from being reported.
 */
@Incubating
@Nested
@Optional
public TextResource getExcludeBugsFilterConfig() {
    return excludeBugsFilterConfig;
}
项目:Reer    文件:CodeNarcPlugin.java   
private void configureTaskConventionMapping(Configuration configuration, CodeNarc task) {
    ConventionMapping taskMapping = task.getConventionMapping();
    taskMapping.map("codenarcClasspath", Callables.returning(configuration));
    taskMapping.map("config", new Callable<TextResource>() {
        @Override
        public TextResource call() {
            return extension.getConfig();
        }
    });
    taskMapping.map("maxPriority1Violations", new Callable<Integer>() {
        @Override
        public Integer call() {
            return extension.getMaxPriority1Violations();
        }
    });
    taskMapping.map("maxPriority2Violations", new Callable<Integer>() {
        @Override
        public Integer call() {
            return extension.getMaxPriority2Violations();
        }
    });
    taskMapping.map("maxPriority3Violations", new Callable<Integer>() {
        @Override
        public Integer call() {
            return extension.getMaxPriority3Violations();
        }
    });
    taskMapping.map("ignoreFailures", new Callable<Boolean>() {
        @Override
        public Boolean call() {
            return extension.isIgnoreFailures();
        }
    });
}
项目:Reer    文件:Groovydoc.java   
@Nullable @Internal
private String getPathToOverview() {
    TextResource overview = getOverviewText();
    if (overview!=null) {
        return overview.asFile().getAbsolutePath();
    }
    return null;
}
项目:Reer    文件:DefaultTemplateBasedStartScriptGenerator.java   
protected static TextResource utf8ClassPathResource(final Class<?> clazz, final String filename) {
    return new CharSourceBackedTextResource("Classpath resource '" + filename + "'", new CharSource() {
        @Override
        public Reader openStream() throws IOException {
            InputStream stream = clazz.getResourceAsStream(filename);
            if (stream == null) {
                throw new IllegalStateException("Could not find class path resource " + filename + " relative to " + clazz.getName());
            }
            return new BufferedReader(new InputStreamReader(stream, Charsets.UTF_8));
        }
    });
}
项目:Reer    文件:CustomizableHtmlReportImpl.java   
@Override
public TextResource getStylesheet() {
    return stylesheet;
}
项目:Reer    文件:CustomizableHtmlReportImpl.java   
@Override
public void setStylesheet(TextResource stylesheet) {
    this.stylesheet = stylesheet;
}
项目:Reer    文件:CheckstyleExtension.java   
public void setConfig(TextResource config) {
    this.config = config;
}
项目:Reer    文件:PmdPlugin.java   
private void configureTaskConventionMapping(Configuration configuration, Pmd task) {
    ConventionMapping taskMapping = task.getConventionMapping();
    taskMapping.map("pmdClasspath", Callables.returning(configuration));
    taskMapping.map("ruleSets", new Callable<List<String>>() {
        @Override
        public List<String> call() {
            return extension.getRuleSets();
        }
    });
    taskMapping.map("ruleSetConfig", new Callable<TextResource>() {
        @Override
        public TextResource call() {
            return extension.getRuleSetConfig();
        }
    });
    taskMapping.map("ruleSetFiles", new Callable<FileCollection>() {
        @Override
        public FileCollection call() {
            return extension.getRuleSetFiles();
        }
    });
    taskMapping.map("ignoreFailures", new Callable<Boolean>() {
        @Override
        public Boolean call() {
            return extension.isIgnoreFailures();
        }
    });
    taskMapping.map("rulePriority", new Callable<Integer>() {
        @Override
        public Integer call() {
            return extension.getRulePriority();
        }
    });
    taskMapping.map("consoleOutput", new Callable<Boolean>() {
        @Override
        public Boolean call() {
            return extension.isConsoleOutput();
        }
    });
    taskMapping.map("targetJdk", new Callable<TargetJdk>() {
        @Override
        public TargetJdk call() {
            return extension.getTargetJdk();
        }
    });
}
项目:Reer    文件:CodeNarcExtension.java   
public void setConfig(TextResource config) {
    this.config = config;
}
项目:Reer    文件:Pmd.java   
public void setRuleSetConfig(TextResource ruleSetConfig) {
    this.ruleSetConfig = ruleSetConfig;
}
项目:Reer    文件:FindBugsPlugin.java   
private void configureTaskConventionMapping(Configuration configuration, FindBugs task) {
    ConventionMapping taskMapping = task.getConventionMapping();
    taskMapping.map("findbugsClasspath", Callables.returning(configuration));
    taskMapping.map("ignoreFailures", new Callable<Boolean>() {
        @Override
        public Boolean call() {
            return extension.isIgnoreFailures();
        }
    });
    taskMapping.map("effort", new Callable<String>() {
        @Override
        public String call() {
            return extension.getEffort();
        }
    });
    taskMapping.map("reportLevel", new Callable<String>() {
        @Override
        public String call() {
            return extension.getReportLevel();
        }
    });
    taskMapping.map("visitors", new Callable<Collection<String>>() {
        @Override
        public Collection<String> call() {
            return extension.getVisitors();
        }
    });
    taskMapping.map("omitVisitors", new Callable<Collection<String>>() {
        @Override
        public Collection<String> call() {
            return extension.getOmitVisitors();
        }
    });

    taskMapping.map("excludeFilterConfig", new Callable<TextResource>() {
        @Override
        public TextResource call() {
            return extension.getExcludeFilterConfig();
        }
    });
    taskMapping.map("includeFilterConfig", new Callable<TextResource>() {
        @Override
        public TextResource call() {
            return extension.getIncludeFilterConfig();
        }
    });
    taskMapping.map("excludeBugsFilterConfig", new Callable<TextResource>() {
        @Override
        public TextResource call() {
            return extension.getExcludeBugsFilterConfig();
        }
    });

    taskMapping.map("extraArgs", new Callable<Collection<String>>() {
        @Override
        public Collection<String> call() {
            return extension.getExtraArgs();
        }
    });
}
项目:Reer    文件:FindBugsExtension.java   
@Incubating
public void setIncludeFilterConfig(TextResource includeFilterConfig) {
    this.includeFilterConfig = includeFilterConfig;
}
项目:Reer    文件:FindBugsExtension.java   
@Incubating
public void setExcludeFilterConfig(TextResource excludeFilterConfig) {
    this.excludeFilterConfig = excludeFilterConfig;
}
项目:Reer    文件:FindBugsExtension.java   
@Incubating
public void setExcludeBugsFilterConfig(TextResource excludeBugsFilterConfig) {
    this.excludeBugsFilterConfig = excludeBugsFilterConfig;
}
项目:Reer    文件:FindBugs.java   
/**
 * The filename of a filter specifying which bugs are reported.
 */
@Internal
public File getIncludeFilter() {
    TextResource config = getIncludeFilterConfig();
    return config == null ? null : config.asFile();
}
项目:Reer    文件:FindBugs.java   
/**
 * The filename of a filter specifying bugs to exclude from being reported.
 */
@Internal
public File getExcludeFilter() {
    TextResource config = getExcludeFilterConfig();
    return config == null ? null : config.asFile();
}
项目:Reer    文件:FindBugs.java   
/**
 * The filename of a filter specifying baseline bugs to exclude from being reported.
 */
@Internal
public File getExcludeBugsFilter() {
    TextResource config = getExcludeBugsFilterConfig();
    return config == null ? null : config.asFile();
}
项目:Reer    文件:FindBugs.java   
public void setIncludeFilterConfig(TextResource includeFilterConfig) {
    this.includeFilterConfig = includeFilterConfig;
}
项目:Reer    文件:FindBugs.java   
public void setExcludeFilterConfig(TextResource excludeFilterConfig) {
    this.excludeFilterConfig = excludeFilterConfig;
}
项目:Reer    文件:FindBugs.java   
public void setExcludeBugsFilterConfig(TextResource excludeBugsFilterConfig) {
    this.excludeBugsFilterConfig = excludeBugsFilterConfig;
}
项目:Reer    文件:CodeNarc.java   
/**
 * The CodeNarc configuration to use. Replaces the {@code configFile} property.
 *
 * @since 2.2
 */
@Incubating
@Nested
public TextResource getConfig() {
    return config;
}
项目:Reer    文件:CodeNarc.java   
public void setConfig(TextResource config) {
    this.config = config;
}
项目:Reer    文件:Checkstyle.java   
/**
 * The Checkstyle configuration to use. Replaces the {@code configFile} property.
 *
 * @since 2.2
 */
@Incubating
@Nested
public TextResource getConfig() {
    return config;
}
项目:Reer    文件:Checkstyle.java   
public void setConfig(TextResource config) {
    this.config = config;
}
项目:Reer    文件:PmdExtension.java   
@Incubating
public void setRuleSetConfig(TextResource ruleSetConfig) {
    this.ruleSetConfig = ruleSetConfig;
}
项目:Reer    文件:Groovydoc.java   
/**
 * Returns a HTML text to be used for overview documentation. Set to {@code null} when there is no overview text.
 */
@Nested
@Optional
public TextResource getOverviewText() {
    return overview;
}
项目:Reer    文件:DefaultTextResourceFactory.java   
public TextResource fromString(String string) {
    return new StringBackedTextResource(tempFileProvider, string);
}
项目:Reer    文件:DefaultTextResourceFactory.java   
public TextResource fromFile(Object file, String charset) {
    return new FileCollectionBackedTextResource(tempFileProvider, fileOperations.files(file), Charset.forName(charset));
}
项目:Reer    文件:DefaultTextResourceFactory.java   
public TextResource fromArchiveEntry(Object archive, String entryPath, String charset) {
    return new FileCollectionBackedArchiveTextResource(fileOperations, tempFileProvider, fileOperations.files(archive), entryPath, Charset.forName(charset));
}
项目:Reer    文件:DefaultTextResourceFactory.java   
public TextResource fromArchiveEntry(Object archive, String entryPath) {
    return fromArchiveEntry(archive, entryPath, Charset.defaultCharset().name());
}
项目:Reer    文件:DefaultTemplateBasedStartScriptGenerator.java   
public DefaultTemplateBasedStartScriptGenerator(String lineSeparator, Transformer<Map<String, String>, JavaAppStartScriptGenerationDetails> bindingFactory, TextResource template) {
    this.lineSeparator = lineSeparator;
    this.bindingFactory = bindingFactory;
    this.template = template;
}
项目:Reer    文件:DefaultTemplateBasedStartScriptGenerator.java   
public void setTemplate(TextResource template) {
    this.template = template;
}
项目:Reer    文件:DefaultTemplateBasedStartScriptGenerator.java   
public TextResource getTemplate() {
    return template;
}
项目:android-gradle-plugins    文件:AndroidFindBugsExtension.java   
@Incubating
public TextResource getIncludeFilterConfig() {
    return this.includeFilterConfig;
}