Package org.codehaus.loom.classman.metadata

Examples of org.codehaus.loom.classman.metadata.ClassLoaderSetMetaData


            new ClassLoaderMetaData( "blah",
                                     "bad-parent",
                                     new String[ 0 ],
                                     new Extension[ 0 ],
                                     new FileSetMetaData[ 0 ] );
        final ClassLoaderSetMetaData metadata =
            new ClassLoaderSetMetaData( "blah",
                                        new String[ 0 ],
                                        new ClassLoaderMetaData[]{classLoader},
                                        new JoinMetaData[ 0 ] );
        final SimpleLoaderResolver resolver = new SimpleLoaderResolver( null );
        final HashMap predefined = new HashMap();
View Full Code Here


    public void testMissingPredefined()
        throws Exception
    {
        final LoaderBuilder builder = new LoaderBuilder();
        final ClassLoaderSetMetaData metadata =
            new ClassLoaderSetMetaData( "*system*",
                                        new String[]{"*system*"},
                                        new ClassLoaderMetaData[ 0 ],
                                        new JoinMetaData[ 0 ] );
        final SimpleLoaderResolver resolver = new SimpleLoaderResolver( null );
        final HashMap predefined = new HashMap();
View Full Code Here

            new ClassLoaderMetaData( "ext",
                                     "*system*",
                                     new String[ 0 ],
                                     new Extension[]{DataConstants.EXTENSION},
                                     new FileSetMetaData[ 0 ] );
        final ClassLoaderSetMetaData metadata =
            new ClassLoaderSetMetaData( "ext",
                                        new String[]{"*system*"},
                                        new ClassLoaderMetaData[]{classLoader},
                                        new JoinMetaData[ 0 ] );
        final SimpleLoaderResolver resolver = new TestLoaderResolver( new File( "." ) );
        final HashMap predefined = new HashMap();
View Full Code Here

        final Policy policy = configurePolicy( policyConfig,
                                               data,
                                               homeDirectory,
                                               workDirectory );

        final ClassLoaderSetMetaData metaData = getLoaderMetaData( environment );

        m_verifier.verifyClassLoaderSet( metaData );

        final LoaderResolver resolver = new SarLoaderResolver(
            m_packageManager, policy, homeDirectory, workDirectory );
        setupLogger( resolver );
        final Map map = m_builder.buildClassLoaders( metaData,
                                                     resolver,
                                                     m_predefinedLoaders );
        final ClassLoader defaultClassLoader = (ClassLoader) map.get(
            metaData.getDefault() );
        return new ClassLoaderSet( defaultClassLoader, map );
    }
View Full Code Here

                                                                    filesets );
        final String[] predefined = new String[]{parent};
        final ClassLoaderMetaData[] classLoaders = new ClassLoaderMetaData[]{
            loader};
        final JoinMetaData[] joins = new JoinMetaData[ 0 ];
        return new ClassLoaderSetMetaData( name,
                                           predefined,
                                           classLoaders,
                                           joins );
    }
View Full Code Here

            config.getElementsByTagName( "predefined" );

        final String[] predefined =
            buildPredefined( predefinedConfigs );

        return new ClassLoaderSetMetaData( defaultClassLoader,
                                           predefined,
                                           classloaders,
                                           joins );
    }
View Full Code Here

    }

    private Map buildClassLoaders( final String resource )
        throws Exception
    {
        final ClassLoaderSetMetaData metaData =
            buildFromResource( resource );
        final ClassLoaderVerifier verifier = new ClassLoaderVerifier();
        verifier.verifyClassLoaderSet( metaData );
        final LoaderBuilder builder = new LoaderBuilder();
        final HashMap predefined = new HashMap();
View Full Code Here

    public void testCtorNullsInClassLoaderSet()
        throws Exception
    {
        try
        {
            new ClassLoaderSetMetaData( null,
                                        new String[ 0 ],
                                        new ClassLoaderMetaData[ 0 ],
                                        new JoinMetaData[ 0 ] );
            fail( "Expected a NPE" );
        }
        catch( NullPointerException e )
        {
            assertEquals( "NPE type", "aDefault", e.getMessage() );
        }

        try
        {
            new ClassLoaderSetMetaData( "",
                                        null,
                                        new ClassLoaderMetaData[ 0 ],
                                        new JoinMetaData[ 0 ] );
            fail( "Expected a NPE" );
        }
        catch( NullPointerException e )
        {
            assertEquals( "NPE type", "predefined", e.getMessage() );
        }

        try
        {
            new ClassLoaderSetMetaData( "",
                                        new String[ 0 ],
                                        new ClassLoaderMetaData[ 0 ],
                                        null );
            fail( "Expected a NPE" );
        }
        catch( NullPointerException e )
        {
            assertEquals( "NPE type", "joins", e.getMessage() );
        }

        try
        {
            new ClassLoaderSetMetaData( "",
                                        new String[ 0 ],
                                        null,
                                        new JoinMetaData[ 0 ] );
            fail( "Expected a NPE" );
        }
View Full Code Here

    public void testConfig13()
        throws Exception
    {
        try
        {
            final ClassLoaderSetMetaData defs =
                buildFromResource( "config13.xml" );
            verify( defs );
        }
        catch( final Throwable t )
        {
View Full Code Here

    public void testConfig14()
        throws Exception
    {
        try
        {
            final ClassLoaderSetMetaData defs =
                buildFromResource( "config14.xml" );
            verify( defs );
        }
        catch( final Throwable t )
        {
View Full Code Here

TOP

Related Classes of org.codehaus.loom.classman.metadata.ClassLoaderSetMetaData

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.