Package org.apache.tapestry5.plastic

Examples of org.apache.tapestry5.plastic.MethodDescription


    public void multiple_validators_via_specification() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator required = mockValidator();
        Validator minLength = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter requiredFormatter = mockMessageFormatter();
        MessageFormatter minLengthFormatter = mockMessageFormatter();
        Object inputValue = "input value";
View Full Code Here


    @Test
    public void validator_with_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

        }

        // Let subclasses do more.
        configure(config);

        renderSupport.addInit("autocompleter", new JSONArray(id, menuId, link.toAbsoluteURI(), config));
    }
View Full Code Here

        "class", "t-autocomplete-menu");
        writer.end();

        Link link = resources.createEventLink(EVENT_NAME);

        JSONObject config = new JSONObject();
        config.put("paramName", PARAM_NAME);
        config.put("indicator", loaderId);

        if (resources.isBound("minChars"))
            config.put("minChars", minChars);

        if (resources.isBound("frequency"))
            config.put("frequency", frequency);

        if (resources.isBound("tokens"))
        {
            for (int i = 0; i < tokens.length(); i++)
            {
                config.accumulate("tokens", tokens.substring(i, i + 1));
            }
        }

        // Let subclasses do more.
        configure(config);
View Full Code Here

                final PlasticField registryField = plasticClass.introduceField(StrategyRegistry.class, "registry")
                        .inject(registry);

                for (final Method method : interfaceType.getMethods())
                {
                    plasticClass.introduceMethod(new MethodDescription(method), new InstructionBuilderCallback()
                    {
                        public void doBuild(InstructionBuilder builder)
                        {
                            Class returnType = method.getReturnType();
View Full Code Here

        for (int i = 0; i < exceptionClassNames.length; i++)
        {
            exceptionClassNames[i] = exceptions.get(i).replace('/', '.');
        }

        return new MethodDescription(node.access, returnType, node.name, arguments, node.signature, exceptionClassNames);
    }
View Full Code Here

        return new TransformMethodSignature(Modifier.PUBLIC, "void", name, RENDER_PHASE_METHOD_PARAMETERS, null);
    }

    private static MethodDescription renderPhaseDescription(String name)
    {
        return new MethodDescription(Modifier.PUBLIC, "void", name, RENDER_PHASE_METHOD_PARAMETERS, null, null);
    }
View Full Code Here

            plasticClass.introduceMethod(method).delegateTo(delegateField);
        }
       
        // TAP5-2235
        final String delegateTypeName = delegateType.getName();
        MethodDescription getDelegateMethodDescription =
                new MethodDescription(delegateTypeName, PlasticProxyFactoryImpl.INTERNAL_GET_DELEGATE);
        plasticClass.introduceMethod(getDelegateMethodDescription, new InstructionBuilderCallback()
        {
            @Override
            public void doBuild(InstructionBuilder builder)
            {
View Full Code Here

                final PlasticField registryField = plasticClass.introduceField(StrategyRegistry.class, "registry")
                        .inject(registry);

                for (final Method method : interfaceType.getMethods())
                {
                    plasticClass.introduceMethod(new MethodDescription(method), new InstructionBuilderCallback()
                    {
                        @Override
                        public void doBuild(InstructionBuilder builder)
                        {
                            Class returnType = method.getReturnType();
View Full Code Here

    public static final MethodDescription CLEANUP_RENDER_DESCRIPTION = renderPhaseDescription("cleanupRender");


    private static MethodDescription renderPhaseDescription(String name)
    {
        return new MethodDescription(Modifier.PUBLIC, "void", name, RENDER_PHASE_METHOD_PARAMETERS, null, null);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.plastic.MethodDescription

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.