Package org.vafer.jdependency

Examples of org.vafer.jdependency.ClazzpathUnit


            {
                SimpleFilter simpleFilter = i.next();
                if ( simpleFilter.canFilter( jar ) )
                {
                    InputStream is = null;
                    ClazzpathUnit depClazzpathUnit = null;
                    try
                    {
                        is = new FileInputStream( dependency.getFile() );
                        depClazzpathUnit = checkCp.addClazzpathUnit( is, dependency.toString() );
                    }
                    finally
                    {
                        IOUtil.close( is );
                    }

                    if ( depClazzpathUnit != null )
                    {
                        Iterator<Clazz> j = removable.iterator();
                        while ( j.hasNext() )
                        {
                            Clazz clazz = j.next();

                            if ( depClazzpathUnit.getClazzes().contains( clazz ) && simpleFilter.isSpecificallyIncluded(
                                clazz.getName().replace( '.', '/' ) ) )
                            {
                                log.info( clazz.getName() + " not removed because it was specifically included" );
                                j.remove();
                            }
View Full Code Here


        this.log = log;

        Clazzpath cp = new Clazzpath();

        ClazzpathUnit artifactUnit =
            cp.addClazzpathUnit( new FileInputStream( project.getArtifact().getFile() ), project.toString() );

        for ( Artifact dependency : project.getArtifacts() )
        {
            addDependencyToClasspath( cp, dependency );
        }

        removable = cp.getClazzes();
        removePackages( artifactUnit );
        removable.removeAll( artifactUnit.getClazzes() );
        removable.removeAll( artifactUnit.getTransitiveDependencies() );
        removeSpecificallyIncludedClasses( project, simpleFilters == null
            ? Collections.<SimpleFilter>emptyList()
            : simpleFilters );
    }
View Full Code Here

    private ClazzpathUnit addDependencyToClasspath( Clazzpath cp, Artifact dependency )
        throws IOException
    {
        InputStream is = null;
        ClazzpathUnit clazzpathUnit = null;
        try
        {
            is = new FileInputStream( dependency.getFile() );
            clazzpathUnit = cp.addClazzpathUnit( is, dependency.toString() );
        }
View Full Code Here

            for ( SimpleFilter simpleFilter : simpleFilters )
            {
                if ( simpleFilter.canFilter( jar ) )
                {
                    ClazzpathUnit depClazzpathUnit = addDependencyToClasspath( checkCp, dependency );
                    if ( depClazzpathUnit != null )
                    {
                        Iterator<Clazz> j = removable.iterator();
                        while ( j.hasNext() )
                        {
                            Clazz clazz = j.next();

                            if ( depClazzpathUnit.getClazzes().contains( clazz )
                                && simpleFilter.isSpecificallyIncluded( clazz.getName().replace( '.', '/' ) ) )
                            {
                                log.info( clazz.getName() + " not removed because it was specifically included" );
                                j.remove();
                            }
View Full Code Here

TOP

Related Classes of org.vafer.jdependency.ClazzpathUnit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.