• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SuffixMapping类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping的典型用法代码示例。如果您正苦于以下问题:Java SuffixMapping类的具体用法?Java SuffixMapping怎么用?Java SuffixMapping使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SuffixMapping类属于org.codehaus.plexus.compiler.util.scan.mapping包,在下文中一共展示了SuffixMapping类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getSatuModelDefinitionFiles

import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping; //导入依赖的package包/类
private List<File> getSatuModelDefinitionFiles() throws InclusionScanException {
    final Log log = getLog();
    final Set<String> inculdePatterns = includes == null || includes.isEmpty() ? Collections.singleton("**/*.satu") : includes;
    final SourceInclusionScanner scanner = new SimpleSourceInclusionScanner(inculdePatterns, excludes);
    scanner.addSourceMapping(new SuffixMapping("satu", Collections.<String> emptySet()));
    final Set<File> modelFiles = scanner.getIncludedSources(sourceDirectory, null);

    if (modelFiles.isEmpty()) {
        log.info("No Satu model files to process");
        return Collections.emptyList();
    }

    final List<File> retVal = new ArrayList<File>();
    for (File modelFile : modelFiles) {
        if (!buildContext.hasDelta(modelFile)) {
            continue;
        }
        buildContext.removeMessages(modelFile);
        log.debug("Satu model file detected: " + modelFile.getPath());
        retVal.add(modelFile);
    }

    Collections.sort(retVal);
    return retVal;
}
 
开发者ID:kaaprotech,项目名称:satu,代码行数:26,代码来源:SatuMojo.java


示例2: findSources

import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping; //导入依赖的package包/类
@Nonnull
public Set<File> findSources(@Nonnull final File targetDirectory) throws MojoExecutionException {
    try {
        final SourceInclusionScanner scanner = new SimpleSourceInclusionScanner(this.includes, this.excludes);
        scanner.addSourceMapping(new SuffixMapping("JBBP", "jbbp"));
        return scanner.getIncludedSources(this.source, targetDirectory);
    } catch (InclusionScanException ex) {
        throw new MojoExecutionException("Error during sources scanning", ex);
    }
}
 
开发者ID:raydac,项目名称:java-binary-block-parser,代码行数:11,代码来源:AbstractJBBPMojo.java


示例3: computeStaleGrammars

import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping; //导入依赖的package包/类
private Set computeStaleGrammars()
  throws MojoExecutionException
{
  SuffixMapping mapping = new SuffixMapping(".jj", ".jj");
  SuffixMapping mappingCAP = new SuffixMapping(".JJ", ".JJ");

  SourceInclusionScanner scanner = new StaleSourceScanner(staleMillis);

  scanner.addSourceMapping(mapping);
  scanner.addSourceMapping(mappingCAP);

  Set staleSources = new HashSet();

  File sourceDir = new File(sourceDirectory, sourcePath);

  try
  {
    staleSources.addAll(scanner.getIncludedSources(sourceDir, 
                                                   timestampDirectory));
  }
  catch (InclusionScanException e)
  {
    throw new MojoExecutionException("Error scanning source root: \'" + 
                                     sourceDir + 
                                     "\' for stale grammars to reprocess.", 
                                     e);
  }

  return staleSources;
}
 
开发者ID:alessandroleite,项目名称:maven-jdev-plugin,代码行数:31,代码来源:JavaCCMojo.java


示例4: execute

import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping; //导入依赖的package包/类
public void execute() throws MojoExecutionException, MojoFailureException {
	getLog().debug("javaDir = " + javaDirectory);
	getLog().debug("sourceDirectory = " + sourceDirectory);
	getLog().debug("sourceFileExt = " + sourceFileExt);
	getLog().debug("targetDirectory = " + outputDirectory);
	getLog().debug("targetFileExt = " + outputFileExt);
	getLog().debug("keepJava = " + keepJava);
	// getLog().debug("keepSerializedObject = " + keepSerializedObject);
	getLog().debug("xmlValidation = " + xmlValidation);
	getLog().debug("compiler = " + compiler);
	getLog().debug("classpathElements = " + classpathElements);
	getLog().debug("additionalClasspath = " + additionalClasspath);

	checkDir(javaDirectory, "Directory for generated java sources", true);
	checkDir(sourceDirectory, "Source directory", false);
	checkDir(outputDirectory, "Target directory", true);

	final SourceMapping mapping = new SuffixMapping(sourceFileExt,
			outputFileExt);

	final Set staleSources = scanSrcDir(mapping);
	if (staleSources.isEmpty()) {
		getLog().info(
				"Nothing to compile - all Jasper reports are up to date");
	} else {
		// actual compilation
		compile(staleSources, mapping);

		if (keepJava) {
			project.addCompileSourceRoot(javaDirectory.getAbsolutePath());
		}
		buildContext.refresh(outputDirectory);
	}
}
 
开发者ID:Slipstone,项目名称:jasperreports-maven-plugin,代码行数:35,代码来源:JasperReportsMojo.java



注:本文中的org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ClientException类代码示例发布时间:2022-05-23
下一篇:
Java Which类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap