当前位置: 首页>>代码示例>>Java>>正文


Java Sink类代码示例

本文整理汇总了Java中org.apache.maven.doxia.sink.Sink的典型用法代码示例。如果您正苦于以下问题:Java Sink类的具体用法?Java Sink怎么用?Java Sink使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Sink类属于org.apache.maven.doxia.sink包,在下文中一共展示了Sink类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DependenciesRenderer

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
/**
 * 
 * @param sink
 * @param project
 * @param mavenProjectBuilder
 * @param locale
 * @param listener
 */
public DependenciesRenderer(	Sink sink, 
								MavenProject project, 
								MavenProjectBuilder mavenProjectBuilder,
								ArtifactRepository localRepository,
								ArtifactFactory factory,
								I18N i18n,
								Locale locale, 
								ReportingResolutionListener listener,
								Log log )
{
    super( sink );

    this.project = project;
    this.locale = locale;
    this.listener = listener;
    this.mavenProjectBuilder = mavenProjectBuilder;
    this.localRepository = localRepository;
    this.i18n 	= i18n;
    this.factory = factory;
    this.log = log;
}
 
开发者ID:bsorrentino,项目名称:maven-confluence-plugin,代码行数:30,代码来源:DependenciesRenderer.java

示例2: doGenerateReport

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
protected void doGenerateReport( Locale locale, Sink sink )
    throws MavenReportException
{
    final Map updateSet;
    try
    {
        updateSet = getHelper().getVersionPropertiesMap( getProject(), properties, includeProperties,
                                                         excludeProperties, autoLinkItems );
    }
    catch ( MojoExecutionException e )
    {
        throw new MavenReportException( e.getMessage(), e );
    }
    PropertyUpdatesRenderer renderer =
        new PropertyUpdatesRenderer( sink, getI18n(), getOutputName(), locale, updateSet );
    renderer.render();
}
 
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:18,代码来源:PropertyUpdatesReport.java

示例3: setUp

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
@Before
public void setUp() throws RendererException, IOException {
  reportFile = new File(tmpFolder.getRoot(), REPORT_FILE);

  final Sink sink = new SiteRendererSink(new RenderingContext(tmpFolder.getRoot(), REPORT_FILE));

  plugin = new ReportMojo() {
    @Override
    public Sink getSink() {
      return sink;
    };
  };

  // Use XHTML5 as it is much faster
  plugin.setXhtmlSchema(HtmlValidator.XHTML5);

  plugin.setLog(new SystemStreamLog());
}
 
开发者ID:rquinio,项目名称:l10n-maven-plugin,代码行数:19,代码来源:ReportMojoTest.java

示例4: generateReport

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
public void generateReport( Locale locale )
    throws MavenReportException
{
    Sink sink;
    ReportGenerator report = new ReportGenerator();
    try
    {
        sink = getSink();

        report.doGenerateReport( getBundle( locale ), sink, xmlParser );
    }
    catch ( Exception e )
    {
        throw new MavenReportException( "Failed to generate JDepend report", e );
    }
}
 
开发者ID:mojohaus,项目名称:jdepend-maven-plugin,代码行数:17,代码来源:AbstractJDependMojo.java

示例5: doGenerateReport

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
protected void doGenerateReport( Locale locale, Sink sink )
    throws MavenReportException
{
    final Map updateSet;
    try
    {
        updateSet =
            getHelper().getVersionPropertiesMap( getProject(), properties, includeProperties, excludeProperties,
                                                 !Boolean.FALSE.equals( autoLinkItems ) );
    }
    catch ( MojoExecutionException e )
    {
        throw new MavenReportException( e.getMessage(), e );
    }
    PropertyUpdatesRenderer renderer =
        new PropertyUpdatesRenderer( sink, getI18n(), getOutputName(), locale, updateSet );
    renderer.render();
}
 
开发者ID:petr-ujezdsky,项目名称:versions-maven-plugin-svn-clone,代码行数:19,代码来源:PropertyUpdatesReport.java

示例6: executeReport

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
@Override
protected void executeReport(Locale locale) throws MavenReportException {
    ensureAnalyzed(locale);

    if (skip) {
        return;
    }

    if (oldAPI == null || newAPI == null) {
        getLog().warn("Could not determine the artifacts to compare. If you're comparing the" +
                " currently built version, have you run the package goal?");
        return;
    }

    if (generateSiteReport) {
        Sink sink = getSink();
        ResourceBundle bundle = getBundle(locale);

        ReportTimeReporter reporter =
                analysisResult.getExtensions().getFirstExtension(ReportTimeReporter.class, null);

        startReport(sink, bundle);
        reportBody(reporter, oldAPI, newAPI, sink, bundle);
        endReport(sink);
    }
}
 
开发者ID:revapi,项目名称:revapi,代码行数:27,代码来源:ReportMojo.java

示例7: reportDifferences

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
private void reportDifferences(
    EnumMap<CompatibilityType, List<ReportTimeReporter.DifferenceReport>> diffsPerType, Sink sink,
    ResourceBundle bundle, String typeKey) {

    if (diffsPerType == null || diffsPerType.isEmpty()) {
        return;
    }

    sink.section2();
    sink.sectionTitle2();
    sink.text(bundle.getString(typeKey));
    sink.sectionTitle2_();

    reportDifferences(diffsPerType.get(CompatibilityType.BINARY), sink, bundle,
        "report.revapi.compatibilityType.binary");
    reportDifferences(diffsPerType.get(CompatibilityType.SOURCE), sink, bundle,
        "report.revapi.compatibilityType.source");
    reportDifferences(diffsPerType.get(CompatibilityType.SEMANTIC), sink, bundle,
        "report.revapi.compatibilityType.semantic");
    reportDifferences(diffsPerType.get(CompatibilityType.OTHER), sink, bundle,
        "report.revapi.compatibilityType.other");

    sink.section2_();
}
 
开发者ID:revapi,项目名称:revapi,代码行数:25,代码来源:ReportMojo.java

示例8: reportBody

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
@Override
protected void reportBody(ReportTimeReporter reporterWithResults, API oldAPI, API newAPI, Sink sink,
        ResourceBundle messages) {
    if (oldAPI == null || newAPI == null) {
        return;
    }

    sink.section2();
    sink.sectionTitle2();
    String title = messages.getString("report.revapi.aggregate.subTitle");
    sink.rawText(MessageFormat.format(title, niceList(oldAPI.getArchives()), niceList(newAPI.getArchives())));
    sink.sectionTitle2_();

    super.reportBody(reporterWithResults, oldAPI, newAPI, sink, messages);

    sink.section2_();
}
 
开发者ID:revapi,项目名称:revapi,代码行数:18,代码来源:ReportAggregateMojo.java

示例9: createReportHeader

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
/**
 * Create the header and title for the HTML report page.
 *
 * @param bundle
 *        The resource bundle with the text.
 * @param sink
 *        The sink for writing to the main report file.
 */
private void createReportHeader (final ResourceBundle bundle, final Sink sink)
{
  sink.head ();
  sink.title ();
  sink.text (bundle.getString ("report.jjdoc.title"));
  sink.title_ ();
  sink.head_ ();

  sink.body ();

  sink.section1 ();
  sink.sectionTitle1 ();
  sink.text (bundle.getString ("report.jjdoc.title"));
  sink.sectionTitle1_ ();
  sink.text (bundle.getString ("report.jjdoc.description"));
  sink.section1_ ();

  sink.lineBreak ();
  sink.table ();
  sink.tableRow ();
  sink.tableHeaderCell ();
  sink.text (bundle.getString ("report.jjdoc.table.heading"));
  sink.tableHeaderCell_ ();
  sink.tableRow_ ();
}
 
开发者ID:phax,项目名称:ph-javacc-maven-plugin,代码行数:34,代码来源:JJDocMojo.java

示例10: createReportLink

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
/**
 * Create a table row containing a link to the JJDoc report for a grammar
 * file.
 *
 * @param sink
 *        The sink to write the report
 * @param sourceDirectory
 *        The source directory of the grammar file.
 * @param grammarFile
 *        The JavaCC grammar file.
 * @param linkPath
 *        The path to the JJDoc output.
 */
private void createReportLink (final Sink sink, final File sourceDirectory, final File grammarFile, String linkPath)
{
  sink.tableRow ();
  sink.tableCell ();
  if (linkPath.startsWith ("/"))
  {
    linkPath = linkPath.substring (1);
  }
  sink.link (linkPath);
  String grammarFileRelativePath = sourceDirectory.toURI ().relativize (grammarFile.toURI ()).toString ();
  if (grammarFileRelativePath.startsWith ("/"))
  {
    grammarFileRelativePath = grammarFileRelativePath.substring (1);
  }
  sink.text (grammarFileRelativePath);
  sink.link_ ();
  sink.tableCell_ ();
  sink.tableRow_ ();
}
 
开发者ID:phax,项目名称:ph-javacc-maven-plugin,代码行数:33,代码来源:JJDocMojo.java

示例11: executeReport

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
@Override
protected void executeReport(Locale arg0) throws MavenReportException {
  if (canGenerateReport()) {
    final Sink sink = getSink();
    log.debug("starting report....................");
    final ObjectMapper mapper = new ObjectMapper();

    documentRestEndpoints(sink, mapper);
    documentTransferClasses(sink, mapper);

    log.debug("Closing up report....................");

    sink.flush();
    sink.close();
  }
}
 
开发者ID:spotify,项目名称:docgenerator,代码行数:17,代码来源:DocgeneratorMojo.java

示例12: processEnum

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
private void processEnum(Sink sink, String className) {
  Class<?> clazz = getClassForNameIsh(sink, className);
  if (clazz == null) {
    sink.text("Was not able to find class: " + className);
    sink.lineBreak();
    return;
  }
  if (clazz.isEnum()) {
    classHeading(sink, className);
    final Object[] constants = clazz.getEnumConstants();
    final List<String> constantsWrapped = Lists.newArrayList();
    for (Object c : constants) {
      constantsWrapped.add("\"" + c + "\"");
    }
    sink.text("Enumerated Type.  Valid values are: ");
    sink.monospaced();
    sink.text(Joiner.on(", ").join(constantsWrapped));
    sink.monospaced_();
    sink.lineBreak();
  } else {
    sink.text("!??!?!!?" + clazz);
    sink.lineBreak();
  }

}
 
开发者ID:spotify,项目名称:docgenerator,代码行数:26,代码来源:DocgeneratorMojo.java

示例13: drawStatsTable

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
/**
 * .
 * @param sink .
 * @param results .
 */
public static void drawStatsTable(
        final Sink sink,
        final Map<String, Integer> results) {
    sink.table();
    sink.tableRow();
    sink.tableHeaderCell();
    sink.text("Rule Name");
    sink.tableHeaderCell_();
    sink.tableHeaderCell();
    sink.text("Errors Detected");
    sink.tableHeaderCell_();
    sink.tableRow_();
    for (Entry<String, Integer> rule : results.entrySet()) {
        sink.tableRow();
        sink.tableCell();
        sink.text(rule.getKey());
        sink.tableCell_();
        sink.tableCell();
        sink.text(rule.getValue().toString());
        sink.tableCell_();
        sink.tableRow_();
    }
    sink.table_();
}
 
开发者ID:mkolisnyk,项目名称:Muto,代码行数:30,代码来源:MavenMutoReporterDrawer.java

示例14: generate

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
@Override
public void generate(final Sink sink, final SinkFactory factory,
    final Locale locale) {
    if (!this.source.exists()) {
        Logger.info(this, "source directory %s is absent", this.source);
        return;
    }
    StaticLoggerBinder.getSingleton().setMavenLog(this.getLog());
    final File home = new File(
        this.getOutputDirectory(),
        this.getOutputName()
    );
    if (home.mkdirs()) {
        Logger.info(this, "site directory %s created", home);
    }
    try {
        new Compiler(this.source, home, this.options).compile();
    } catch (final IOException ex) {
        throw new IllegalStateException(ex);
    }
    this.front(sink);
}
 
开发者ID:yegor256,项目名称:requs,代码行数:23,代码来源:ReportMojo.java

示例15: front

import org.apache.maven.doxia.sink.Sink; //导入依赖的package包/类
/**
 * Make a front page.
 * @param sink Sink to use
 */
private void front(final Sink sink) {
    sink.section1();
    sink.sectionTitle1();
    sink.text("Requs SRS");
    sink.sectionTitle1_();
    sink.paragraph();
    sink.text("This page contains ");
    sink.link(String.format("%s/requs.xml", this.getOutputName()));
    sink.text("Software Requirements Specification (SRS)");
    sink.link_();
    sink.text(" generated by requs compiler.");
    sink.paragraph();
    sink.text("More information you can get at ");
    sink.link("http://www.requs.org");
    sink.text("www.requs.org");
    sink.link_();
    sink.text(".");
    sink.paragraph_();
    sink.section1_();
}
 
开发者ID:yegor256,项目名称:requs,代码行数:25,代码来源:ReportMojo.java


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