Package org.codehaus.loom.classman.metadata

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


{
    public void testMissingClassLoader()
        throws Exception
    {
        final LoaderBuilder builder = new LoaderBuilder();
        final ClassLoaderMetaData classLoader =
            new ClassLoaderMetaData( "blah",
                                     "bad-parent",
                                     new String[ 0 ],
                                     new Extension[ 0 ],
                                     new FileSetMetaData[ 0 ] );
        final ClassLoaderSetMetaData metadata =
View Full Code Here


    public void testExtensions()
        throws Exception
    {
        final LoaderBuilder builder = new LoaderBuilder();
        final ClassLoaderMetaData classLoader =
            new ClassLoaderMetaData( "ext",
                                     "*system*",
                                     new String[ 0 ],
                                     new Extension[]{DataConstants.EXTENSION},
                                     new FileSetMetaData[ 0 ] );
        final ClassLoaderSetMetaData metadata =
View Full Code Here

        throws Exception
    {
        final ClassLoaderMetaData[] classLoaders = set.getClassLoaders();
        for( int i = 0; i < classLoaders.length; i++ )
        {
            final ClassLoaderMetaData classLoader = classLoaders[ i ];
            final String parent = classLoader.getParent();
            if( !isLoaderDefined( parent, set ) )
            {
                final String message =
                    REZ.format( "invalid-parent.error",
                                classLoader.getName(),
                                parent );
                throw new Exception( message );
            }
        }
    }
View Full Code Here

        throws Exception
    {
        final ClassLoaderMetaData[] classLoaders = set.getClassLoaders();
        for( int i = 0; i < classLoaders.length; i++ )
        {
            final ClassLoaderMetaData classLoader = classLoaders[ i ];
            verifyUniqueName( set,
                              classLoader.getName(),
                              "classloader",
                              classLoader );
        }
    }
View Full Code Here

        }

        final ClassLoaderMetaData[] classLoaders = set.getClassLoaders();
        for( int j = 0; j < classLoaders.length; j++ )
        {
            final ClassLoaderMetaData other = classLoaders[ j ];
            if( other == entity )
            {
                continue;
            }
            if( other.getName().equals( name ) )
            {
                final String message =
                    REZ.format( "duplicate-name.error",
                                type,
                                "classloader",
View Full Code Here

        final String name = "default";
        final String parent = "*system*";
        final String[] entrys = new String[]{"SAR-INF/classes/"};
        final Extension[] extensions = new Extension[ 0 ];
        final FileSetMetaData[] filesets = new FileSetMetaData[]{fileSet};
        final ClassLoaderMetaData loader = new ClassLoaderMetaData( name,
                                                                    parent,
                                                                    entrys,
                                                                    extensions,
                                                                    filesets );
        final String[] predefined = new String[]{parent};
View Full Code Here

        if( classLoaders.containsKey( name ) )
        {
            return;
        }

        final ClassLoaderMetaData regular = set.getClassLoader( name );
        if( null != regular )
        {
            //Make sure parent classloader is built
            processClassLoader( regular.getParent(),
                                set,
                                resolver,
                                classLoaders );

            final ClassLoader classLoader =
View Full Code Here

        final int length = configs.getLength();

        for( int i = 0; i < length; i++ )
        {
            final Element item = (Element)configs.item( i );
            final ClassLoaderMetaData loader = buildLoader( item );
            loaders.add( loader );
        }

        return (ClassLoaderMetaData[])loaders.toArray(
            new ClassLoaderMetaData[ loaders.size() ] );
View Full Code Here

            buildEntrys( config.getElementsByTagName( "entry" ) );
        final Extension[] extensions =
            buildExtensions( config.getElementsByTagName( "extension" ) );
        final FileSetMetaData[] fileSets =
            buildFileSets( config.getElementsByTagName( "fileset" ) );
        return new ClassLoaderMetaData( name, parent, entrys,
                                        extensions, fileSets );
    }
View Full Code Here

TOP

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

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.