Package org.apache.hivemind

Examples of org.apache.hivemind.ClassResolver


     * Builds a registry for files in the classpath.
     */
    public static Registry buildClasspathRegistry(String[] files)
        throws Exception
    {
        ClassResolver resolver = new DefaultClassResolver();
       
        RegistryBuilder builder = new RegistryBuilder();
        builder.autoDetectModules();

        for (int i = 0; i < files.length; i++)
View Full Code Here


     * the master module descriptor (i.e., those visible on the classpath).
     * Files are resolved using {@link HiveMindTestCase#getResource(String)}.
     */
    protected Registry buildFrameworkRegistry(String[] files) throws Exception
    {
        ClassResolver resolver = new DefaultClassResolver();

        RegistryBuilder builder = new RegistryBuilder();

        for (int i = 0; i < files.length; i++)
        {
View Full Code Here

     */
    public void testResolveTypeCache()
    {
        Class expected = getClass();

        ClassResolver resolver = newClassResolver();

        trainCheckForClass(resolver, "FooBar", expected);

        replayControls();

View Full Code Here

        // here that aren't necessary in an ordinary HiveMind application.

        String projectRoot = System.getProperty("PROJECT_ROOT", ".");
        String path = projectRoot + "/examples/src/descriptor/META-INF/" + fileName;

        ClassResolver resolver = new DefaultClassResolver();

        // Register the examples.xml file, which (given its non-standard name)
        // is not visible.
        ModuleDescriptorProvider provider = new XmlModuleDescriptorProvider(resolver,
                new FileResource(path));
View Full Code Here

    /**
     * Builds a registry for files in the classpath.
     */
    public static Registry buildClasspathRegistry(String[] files) throws Exception
    {
        ClassResolver resolver = new DefaultClassResolver();

        List descriptorResources = new ArrayList();
        for (int i = 0; i < files.length; i++)
        {
            Resource resource = getResource(files[i]);
View Full Code Here

        return buildRegistry(provider);
    }
   
    protected static Registry buildRegistry(ModuleDescriptorProvider customProvider)
    {
        ClassResolver resolver = new DefaultClassResolver();

        RegistryBuilder builder = new RegistryBuilder();

        builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(resolver));
        builder.addModuleDescriptorProvider(customProvider);
View Full Code Here

     */
    protected Registry constructRegistry(FilterConfig config)
    {
        RegistryBuilder builder = new RegistryBuilder();

        ClassResolver resolver = new DefaultClassResolver();

        addDefaultModules(builder, resolver);

        addWebInfDescriptor(config.getServletContext(), resolver, builder);

View Full Code Here

     * descriptor (i.e., those visible on the classpath). Files are resolved using
     * {@link HiveMindTestCase#getResource(String)}.
     */
    protected Registry buildFrameworkRegistry(String[] files) throws Exception
    {
        ClassResolver resolver = getClassResolver();
       
        RegistryBuilder builder = new RegistryBuilder();
        builder.autoDetectModules();

        for (int i = 0; i < files.length; i++)
View Full Code Here

        assertNotNull(h.getErrorHandler());
    }

    public void testBuilderClassResolverFacet()
    {
        ClassResolver cr = (ClassResolver) newMock(ClassResolver.class);

        MockControl pc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters p = (ServiceImplementationFactoryParameters) pc
                .getMock();
View Full Code Here

        assertNotNull(h.getErrorHandler());
    }

    public void testBuilderClassResolverFacet()
    {
        ClassResolver cr = (ClassResolver) newMock(ClassResolver.class);

        MockControl pc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters p = (ServiceImplementationFactoryParameters) pc
                .getMock();
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ClassResolver

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.