亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? taglistreport.java

?? anewssystem新聞發布系統集成使用了spring hibernate freemarker EXTJS等開源框架 可以作為學習參考
?? JAVA
字號:
package org.codehaus.mojo.taglist;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;

import org.apache.maven.model.ReportPlugin;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.AbstractMavenReport;
import org.apache.maven.reporting.MavenReportException;
import org.codehaus.doxia.site.renderer.SiteRenderer;
import org.codehaus.plexus.util.PathTool;
import org.codehaus.plexus.util.StringUtils;

/**
 * MOJO for the tag list report.
 *
 * @author <a href="mailto:bellingard.NO-SPAM@gmail.com">Fabrice Bellingard </a>
 * @goal taglist
 */
public class TagListReport
    extends AbstractMavenReport
{
    /**
     * @parameter expression="${project}"
     * @required
     * @readonly
     */
    private MavenProject project;

    /**
     * @component
     */
    private SiteRenderer siteRenderer;

    /**
     * Source directories of the project.
     *
     * @parameter expression="${project.compileSourceRoots}"
     * @required
     * @readonly
     */
    private List sourceDirs;

    /**
     * Test directories of the project.
     *
     * @parameter expression="${project.testCompileSourceRoots}"
     * @required
     * @readonly
     */
    private List testSourceDirs;

    /**
     * Output folder where the report will be copied to.
     *
     * @parameter expression="${project.build.directory}/site"
     * @required
     */
    private String outputDirectory;

    /**
     * List of tags to look for, specified as &lt;tag&gt; tags.
     * The tags can be either:
     * <ul>
     * <li>Javadoc tags: "@todo" for instance</li>
     * <li>Simple tags: "TODO" for instance. In this case, the tags will be
     * searched in any Java comment (//, /* or /**).</li>
     * </ul>
     *
     * @parameter
     */
    private String[] tags;

    /**
     * This parameter indicates whether for simple tags (like "TODO"), the
     * analyser should look for multiple line comments.
     *
     * @parameter default-value="true"
     */
    private boolean multipleLineComments;

    /**
     * This parameter indicates whether to look for tags even if they don't
     * have a comment.
     *
     * @parameter default-value="true"
     */
    private boolean emptyComments;

    /**
     * Link the tag line numbers to the source xref. Defaults to true and will link
     * automatically if jxr plugin is being used.
     *
     * @parameter expression="${linkXRef}" default-value="true"
     */
    private boolean linkXRef;

    /**
     * Location of the Xrefs to link to.
     *
     * @parameter default-value="${project.build.directory}/site/xref"
     */
    private File xrefLocation;

    /**
     * Location of the Test Xrefs to link to.
     *
     * @parameter default-value="${project.build.directory}/site/xref-test"
     */
    private File testXrefLocation;

    /**
     * The projects in the reactor for aggregation report.
     *
     * @parameter expression="${reactorProjects}"
     * @readonly
     */
    protected List reactorProjects;

    /**
     * Whether to build an aggregated report at the root, or build individual reports.
     *
     * @parameter expression="${aggregate}" default-value="false"
     */
    protected boolean aggregate;

    /**
     * The locale used for rendering the page
     */
    private Locale currentLocale;

    /**
     * Cf. overriden method documentation.
     *
     * @see org.apache.maven.reporting.AbstractMavenReport#executeReport(java.util.Locale)
     */
    protected void executeReport( Locale locale )
        throws MavenReportException
    {
        this.currentLocale = locale;

        if ( tags == null || tags.length == 0 )
        {
            tags = new String[] { "@todo", "TODO","FIXME" };
        }

        File outputDir = new File( outputDirectory );
        if ( !outputDir.exists() )
        {
            boolean success = outputDir.mkdirs();
            if ( !success )
            {
                throw new MavenReportException( "Folder " + outputDirectory + " could not be created." );
            }
        }

        // let's proceed to the analysis
        FileAnalyser fileAnalyser = new FileAnalyser( this );
        Collection tagReports = fileAnalyser.execute();

        // Renders the report
        ReportGenerator generator = new ReportGenerator( this, tagReports );
        if ( linkXRef )
        {
            String relativePath = getRelativPath( xrefLocation );
            if ( xrefLocation.exists() )
            {
                // XRef was already generated by manual execution of a lifecycle binding
                generator.setXrefLocation( relativePath );
                generator.setTestXrefLocation( getRelativPath( testXrefLocation ) );
            }
            else
            {
                // Not yet generated - check if the report is on its way
                for ( Iterator reports = project.getReportPlugins().iterator(); reports.hasNext(); )
                {
                    ReportPlugin report = (ReportPlugin) reports.next();

                    String artifactId = report.getArtifactId();
                    if ( "maven-jxr-plugin".equals( artifactId ) || "jxr-maven-plugin".equals( artifactId ) )
                    {
                        generator.setXrefLocation( relativePath );
                        generator.setTestXrefLocation( getRelativPath( testXrefLocation ) );
                    }
                }
            }

            if ( generator.getXrefLocation() == null )
            {
                getLog().warn( "Unable to locate Source XRef to link to - DISABLED" );
            }
        }
        generator.generateReport();
    }

    /**
     * Returns the path relativ to the output directory
     * @param location the location to make relativ
     * @return the relativ path
     */
    private String getRelativPath( File location )
    {
        String relativePath = PathTool.getRelativePath( outputDirectory, location.getAbsolutePath() );
        if ( StringUtils.isEmpty( relativePath ) )
        {
            relativePath = ".";
        }
        relativePath = relativePath + "/" + location.getName();
        return relativePath;
    }

    /**
     * Cf. overriden method documentation.
     *
     * @see org.apache.maven.reporting.MavenReport#canGenerateReport()
     */
    public boolean canGenerateReport()
    {
        boolean canGenerate = !constructSourceDirs().isEmpty();
        if ( aggregate && !project.isExecutionRoot() )
        {
            canGenerate = false;
        }
        return canGenerate;
    }

    /**
     * Removes empty dirs from the list.
     * @param sourceDirs the original list of directories
     * @return a new list containing only non empty dirs
     */
    private List pruneSourceDirs( List sourceDirs )
    {
        List pruned = new ArrayList( sourceDirs.size() );
        for ( Iterator i = sourceDirs.iterator(); i.hasNext(); )
        {
            String dir = (String) i.next();
            if ( !pruned.contains( dir ) && hasSources( new File( dir ) ) )
            {
                pruned.add( dir );
            }
        }
        return pruned;
    }

    /**
     * Checks whether the given directory contains Java files.
     *
     * @param dir the source directory
     * @return true if the folder or one of its subfolders coantins at least 1 Java file
     */
    private boolean hasSources( File dir )
    {
        boolean found = false;
        if ( dir.exists() && dir.isDirectory() )
        {
            File[] files = dir.listFiles();
            for ( int i = 0; i < files.length && !found; i++ )
            {
                File currentFile = files[i];
                if ( currentFile.isFile() && currentFile.getName().endsWith( ".java" ) )
                {
                    found = true;
                }
                else if ( currentFile.isDirectory() )
                {
                    boolean hasSources = hasSources( currentFile );
                    if ( hasSources )
                    {
                        found = true;
                    }
                }
            }
        }
        return found;
    }

    /**
     * Construct the list of source directories to analyse
     * @return the list of dirs
     */
    public List constructSourceDirs()
    {
        List dirs = new ArrayList( sourceDirs );
        dirs.addAll( testSourceDirs );

        if ( aggregate )
        {
            for ( Iterator i = reactorProjects.iterator(); i.hasNext(); )
            {
                MavenProject project = (MavenProject) i.next();

                if ( "java".equals( project.getArtifact().getArtifactHandler().getLanguage() ) )
                {
                    sourceDirs.addAll( project.getCompileSourceRoots() );
                    sourceDirs.addAll( project.getTestCompileSourceRoots() );
                }
            }
        }

        dirs = pruneSourceDirs( dirs );
        return dirs;
    }

    /**
     * Returns the tags to look for.
     *
     * @return a collection of String objects representing the tag names.
     */
    public String[] getTags()
    {
        return tags;
    }

    /**
     * Tells whether to look for comments over multiple lines
     *
     * @return Returns true if the analyser should look for multiple lines.
     */
    public boolean isMultipleLineComments()
    {
        return multipleLineComments;
    }

    /**
     * Tells wether to look for tags without comments
     *
     * @return the emptyComments
     */
    public boolean isEmptyComments()
    {
        return emptyComments;
    }

    /**
     * Cf. overriden method documentation.
     *
     * @see org.apache.maven.reporting.AbstractMavenReport#getSiteRenderer()
     */
    protected SiteRenderer getSiteRenderer()
    {
        return siteRenderer;
    }

    /**
     * Cf. overriden method documentation.
     *
     * @see org.apache.maven.reporting.AbstractMavenReport#getOutputDirectory()
     */
    protected String getOutputDirectory()
    {
        return outputDirectory;
    }

    /**
     * Cf. overriden method documentation.
     *
     * @see org.apache.maven.reporting.AbstractMavenReport#getProject()
     */
    public MavenProject getProject()
    {
        return project;
    }

    /**
     * Cf. overriden method documentation.
     *
     * @see org.apache.maven.reporting.MavenReport#getDescription(java.util.Locale)
     */
    public String getDescription( Locale locale )
    {
        return getBundle( locale ).getString( "report.taglist.description" );
    }

    /**
     * Cf. overriden method documentation.
     *
     * @see org.apache.maven.reporting.MavenReport#getName(java.util.Locale)
     */
    public String getName( Locale locale )
    {
        return getBundle( locale ).getString( "report.taglist.name" );
    }

    /**
     * Cf. overriden method documentation.
     *
     * @see org.apache.maven.reporting.MavenReport#getOutputName()
     */
    public String getOutputName()
    {
        return "taglist";
    }

    /**
     * Returns the correct resource bundle according to the locale
     *
     * @return the bundle correponding to the locale used for rendering the report
     */
    public ResourceBundle getBundle()
    {
        return getBundle( currentLocale );
    }

    /**
     * Returns the correct resource bundle according to the locale
     *
     * @param locale :
     *               the locale of the user
     * @return the bundle correponding to the locale
     */
    private ResourceBundle getBundle( Locale locale )
    {
        return ResourceBundle.getBundle( "taglist-report", locale, this.getClass().getClassLoader() );
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美喷潮久久久xxxxx| 国产精品黄色在线观看| 日韩欧美一区二区久久婷婷| 中文字幕不卡在线| 日本不卡视频一二三区| 91蜜桃传媒精品久久久一区二区| 欧美一区二区福利视频| 亚洲精品亚洲人成人网| 丁香网亚洲国际| 欧美一区二区三区免费观看视频| 一区二区三区中文字幕| 成人av资源在线| 久久综合丝袜日本网| 蜜臀va亚洲va欧美va天堂| 色视频成人在线观看免| 欧美—级在线免费片| 免费观看在线色综合| 欧美手机在线视频| 亚洲免费av网站| 国产激情91久久精品导航| 日韩美女一区二区三区| 午夜国产精品一区| 欧美日韩一级二级| 亚洲国产中文字幕| 在线观看三级视频欧美| 亚洲免费看黄网站| 一本一道久久a久久精品综合蜜臀| 欧美国产综合色视频| 精品视频全国免费看| 中文字幕久久午夜不卡| 国产精品影视网| 久久伊人中文字幕| 国产精品系列在线播放| 久久婷婷成人综合色| 国产成人亚洲精品狼色在线| 久久久精品国产99久久精品芒果| 久久超碰97人人做人人爱| 精品国产一区二区三区不卡 | 色av一区二区| 亚洲蜜臀av乱码久久精品| 欧洲精品在线观看| 亚洲午夜av在线| 日韩午夜激情av| 国产在线不卡一卡二卡三卡四卡| 久久亚洲私人国产精品va媚药| 国产一区二区毛片| 国产精品色噜噜| bt欧美亚洲午夜电影天堂| 亚洲精品成人悠悠色影视| 欧美少妇性性性| 精品无码三级在线观看视频| 久久伊人蜜桃av一区二区| 不卡的av中国片| 亚洲激情第一区| 欧美一区二区在线看| 国产又粗又猛又爽又黄91精品| 国产网站一区二区三区| av一二三不卡影片| 午夜久久电影网| 久久看人人爽人人| 一本久久a久久免费精品不卡| 一二三四社区欧美黄| 欧美成人精品3d动漫h| 岛国一区二区三区| 亚洲一区精品在线| 337p日本欧洲亚洲大胆精品| av在线播放不卡| 天堂久久一区二区三区| 国产三级久久久| 国产欧美1区2区3区| 9i看片成人免费高清| 天堂精品中文字幕在线| 欧美激情综合五月色丁香小说| 欧美色爱综合网| 成人听书哪个软件好| 天堂一区二区在线| 日韩一区在线播放| 日韩欧美一区二区三区在线| 一本色道a无线码一区v| 国产精品夜夜嗨| 日韩二区在线观看| 亚洲六月丁香色婷婷综合久久| 精品国产三级a在线观看| 色香蕉久久蜜桃| 国产成人精品亚洲777人妖| 亚洲成av人片在www色猫咪| 日本一区二区视频在线| 91精品欧美久久久久久动漫| 色综合久久88色综合天天免费| 国内成人免费视频| 视频在线观看一区二区三区| 亚洲美女屁股眼交| 国产亚洲一本大道中文在线| 在线综合亚洲欧美在线视频| 色94色欧美sute亚洲线路一久| 国产精品一区久久久久| 久久91精品国产91久久小草| 午夜视频在线观看一区| 一区二区三区.www| 中文字幕在线观看不卡| 久久久噜噜噜久久中文字幕色伊伊| 欧美日韩精品高清| 日本久久电影网| 色偷偷88欧美精品久久久| 成人视屏免费看| 成人做爰69片免费看网站| 国产一区欧美二区| 国产伦精品一区二区三区视频青涩 | 色妹子一区二区| 丁香婷婷综合网| 欧美一区二区视频在线观看2022 | 国产v综合v亚洲欧| 国产中文字幕精品| 国内精品国产成人国产三级粉色| 男女性色大片免费观看一区二区 | 国产盗摄一区二区| 福利一区福利二区| 在线观看中文字幕不卡| 中文字幕精品综合| 精品国产乱子伦一区| 91精品国产色综合久久不卡电影| 欧美在线综合视频| 欧美日韩中文字幕一区| 91精品国产一区二区| 91精品国产综合久久久久久| 在线电影院国产精品| 欧美精品18+| 精品入口麻豆88视频| 国产亚洲综合在线| 一色屋精品亚洲香蕉网站| 一区二区三区免费| 日韩和的一区二区| 国内精品视频666| 成人精品一区二区三区中文字幕| 成人福利在线看| 欧美性色黄大片| 日韩一级片网站| 欧美激情在线一区二区| 亚洲欧美另类综合偷拍| 午夜日韩在线观看| 韩国精品主播一区二区在线观看| 国产精品自拍毛片| 色婷婷av久久久久久久| 欧美一区二区三区视频在线 | 91免费视频网| 欧美一区中文字幕| 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲免费av高清| 奇米精品一区二区三区四区| 国产美女主播视频一区| 色综合咪咪久久| 日韩精品一区二区三区在线播放| 久久久久久毛片| 亚洲午夜激情av| 国产精品1区2区3区在线观看| 91蜜桃传媒精品久久久一区二区| 91精品综合久久久久久| 亚洲国产精品激情在线观看| 亚洲国产精品久久艾草纯爱| 国产一区二区三区在线观看免费视频 | 久久精品国产亚洲一区二区三区| 成人黄色国产精品网站大全在线免费观看 | 夜夜夜精品看看| 国产激情精品久久久第一区二区| 欧美偷拍一区二区| 国产婷婷精品av在线| 亚洲黄色尤物视频| 国产激情精品久久久第一区二区 | 色综合久久99| 国产日韩欧美a| 午夜不卡在线视频| www.欧美亚洲| 久久久久久一二三区| 亚洲在线观看免费视频| 国产成人精品1024| 欧美一区二区三区播放老司机| 中文久久乱码一区二区| 蜜桃一区二区三区四区| 久久婷婷国产综合国色天香| 亚洲午夜久久久久| 成人黄色大片在线观看| 久久亚洲一区二区三区明星换脸 | 国产乱国产乱300精品| 51精品国自产在线| 亚洲va在线va天堂| 色老汉一区二区三区| 国产精品视频你懂的| 国产精品综合久久| 久久蜜臀精品av| 久久99精品一区二区三区三区| 6080日韩午夜伦伦午夜伦| 亚洲一区二区三区免费视频| 91美女在线视频| 亚洲欧美怡红院| gogo大胆日本视频一区| 国产精品毛片久久久久久| 国产 欧美在线| 国产精品久久久爽爽爽麻豆色哟哟| 国产美女av一区二区三区| 国产亚洲一本大道中文在线|