Examples of DecoratorDef


Examples of org.apache.tapestry.ioc.def.DecoratorDef

        // Qualify any unqualified match patterns with the decorator's module id.

        for (int i = 0; i < patterns.length; i++)
            patterns[i] = toQualifiedId(_moduleId, patterns[i]);

        DecoratorDef def = new DecoratorDefImpl(id, method, patterns, constraints);

        _decoratorDefs.put(id, def);
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.DecoratorDef

        Set<DecoratorDef> defs = md.getDecoratorDefs();

        assertEquals(defs.size(), 1);

        DecoratorDef dd = defs.iterator().next();

        assertEquals(dd.getDecoratorId(), "ioc.Logging");
        assertEquals(dd.toString(), className + ".decorateLogging(Class, Object)");

        verify();

    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.DecoratorDef

        // TODO: Validate constraints here?

        String[] patterns = match == null ? new String[]
        { decoratorId } : match.value();

        DecoratorDef def = new DecoratorDefImpl(decoratorId, method, patterns, constraints,
                _classFactory);

        _decoratorDefs.put(decoratorId, def);
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.DecoratorDef

        Set<DecoratorDef> defs = md.getDecoratorDefs();

        assertEquals(defs.size(), 1);

        DecoratorDef dd = defs.iterator().next();

        assertEquals(dd.getDecoratorId(), "ioc.Logging");
        assertEquals(dd.toString(), className + ".decorateLogging(Class, Object)");

        verify();

    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.DecoratorDef

    @Test
    public void find_decorator_defs_for_service()
    {
        InternalRegistry registry = newInternalRegistry();
        ServiceDef serviceDef = newServiceDef();
        DecoratorDef def1 = newDecoratorDef();
        DecoratorDef def2 = newDecoratorDef();
        Set<DecoratorDef> rawDefs = newMock(Set.class);
        Log log = newLog();

        ModuleDef moduleDef = newModuleDef();
View Full Code Here

Examples of org.apache.tapestry.ioc.def.DecoratorDef

        // Qualify any unqualified match patterns with the decorator's module id.

        for (int i = 0; i < patterns.length; i++)
            patterns[i] = toQualifiedId(_moduleId, patterns[i]);

        DecoratorDef def = new DecoratorDefImpl(id, method, patterns, constraints);

        _decoratorDefs.put(id, def);
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.DecoratorDef

        // TODO: Validate constraints here?

        String[] patterns = match == null ? new String[]
        { decoratorId } : match.value();

        DecoratorDef def = new DecoratorDefImpl(decoratorId, method, patterns, constraints,
                _classFactory);

        _decoratorDefs.put(decoratorId, def);
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.DecoratorDef

        Set<DecoratorDef> defs = md.getDecoratorDefs();

        assertEquals(defs.size(), 1);

        DecoratorDef dd = defs.iterator().next();

        assertEquals(dd.getDecoratorId(), "Logging");
        assertTrue(dd.toString().contains(className + ".decorateLogging(Class, Object)"));

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.DecoratorDef

    @Test
    public void find_decorator_defs_for_service()
    {
        InternalRegistry registry = newInternalRegistry();
        ServiceDef serviceDef = newServiceDef();
        DecoratorDef def1 = newDecoratorDef();
        DecoratorDef def2 = newDecoratorDef();
        Set<DecoratorDef> rawDefs = newMock(Set.class);
        Log log = newLog();

        ModuleDef moduleDef = newModuleDef();
View Full Code Here

Examples of org.apache.tapestry5.ioc.def.DecoratorDef

        Class returnType = method.getReturnType();

        if (returnType.isPrimitive() || returnType.isArray())
            throw new RuntimeException(IOCMessages.decoratorMethodWrongReturnType(method));

        DecoratorDef def = new DecoratorDefImpl(method, extractPatterns(decoratorId, method),
                extractConstraints(method), classFactory, decoratorId);

        decoratorDefs.put(decoratorId, def);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.