Package org.apache.tapestry5.ioc.internal.util

Examples of org.apache.tapestry5.ioc.internal.util.InjectionResources


    {
        Map<Class, Object> resources = CollectionFactory.newMap(this.resourcesDefaults);

        resources.put(MethodAdviceReceiver.class, methodAdviceReceiver);

        InjectionResources injectionResources = new MapInjectionResources(resources);

        // By design, advise methods return void, so we know that the return value is null.

        invoke(injectionResources);
    }
View Full Code Here


     * Returns a map (based on parameterDefaults) that includes (possibly) an additional mapping containing the
     * collected configuration data. This involves scanning the parameters and generic types.
     */
    protected final InjectionResources createInjectionResources()
    {
        InjectionResources core = new MapInjectionResources(injectionResources);

        InjectionResources configurations = new InjectionResources()
        {
            private boolean seenOne;

            public <T> T findResource(Class<T> resourceType, Type genericType)
            {
View Full Code Here

                        Map<Class, Object> resourceMap = CollectionFactory.newMap();

                        resourceMap.put(ObjectLocator.class, locator);
                        resourceMap.put(Logger.class, logger);

                        InjectionResources injectionResources = new MapInjectionResources(resourceMap);

                        Throwable fail = null;

                        Object moduleInstance = InternalUtils.isStatic(startupMethod) ? null : moduleBuilderSource.getModuleBuilder();
View Full Code Here

    @Primary
    private StackTraceElementAnalyzer frameAnalyzer;

    void setupRender()
    {
        ExceptionAnalysis analysis = analyzer.analyze(exception);

        stack = analysis.getExceptionInfos();

        toggleId = renderSupport.allocateClientId("toggleStack");
    }
View Full Code Here

    @Test
    public void unknown_validator_type()
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Map<String, Validator> map = newMap();
View Full Code Here

    @Test
    public void validator_with_no_constraint() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
View Full Code Here

    @Test
    public void component_messages_overrides_validator_messages() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
View Full Code Here

    @Test
    public void component_messages_overrides_validator_messages_per_form() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
View Full Code Here

    @Test
    public void constraint_value_from_message_catalog_per() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
View Full Code Here

    @Test
    public void constraint_value_from_message_catalog_per_form() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.internal.util.InjectionResources

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.