Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.MethodSignature


            newMethod.setBody(null);

            _ctClass.addMethod(newMethod);

            MethodSignature sig = getMethodSignature(newMethod);

            addMethodToDescription("add default", sig, "<default>");
        }
        catch (CannotCompileException ex)
        {
View Full Code Here


        {
            List<Annotation> annotations = findMethodAnnotations(method);

            if (findAnnotationInList(annotationClass, annotations) != null)
            {
                MethodSignature sig = getMethodSignature(method);
                result.add(sig);
            }
        }

        Collections.sort(result);
View Full Code Here

        List<MethodSignature> result = newList();

        for (CtMethod method : _ctClass.getDeclaredMethods())
        {
            MethodSignature sig = getMethodSignature(method);

            if (filter.accept(sig))
                result.add(sig);
        }
View Full Code Here

        return result;
    }

    private MethodSignature getMethodSignature(CtMethod method)
    {
        MethodSignature result = _methodSignatures.get(method);
        if (result == null)
        {
            try
            {
                String type = method.getReturnType().getName();
                String[] parameters = toTypeNames(method.getParameterTypes());
                String[] exceptions = toTypeNames(method.getExceptionTypes());

                result = new MethodSignature(method.getModifiers(), type, method.getName(),
                        parameters, exceptions);

                _methodSignatures.put(method, result);
            }
            catch (NotFoundException ex)
View Full Code Here

    {
        String methodName = newMemberName("write", fieldName);

        String fieldType = getFieldType(fieldName);

        MethodSignature sig = new MethodSignature(Modifier.PRIVATE, "void", methodName,
                new String[]
                { fieldType }, null);

        String message = ServicesMessages.readOnlyField(_ctClass.getName(), fieldName);
View Full Code Here

    public void no_methods_with_annotation()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();

        MethodSignature sig = new MethodSignature("foo");

        train_findMethods(ct, sig);
        train_getMethodAnnotation(ct, sig, OnEvent.class, null);

        replay();
View Full Code Here

    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        MethodSignature signature = new MethodSignature("foo");

        train_findMethods(ct, signature);

        train_getMethodAnnotation(ct, signature, OnEvent.class, annotation);
View Full Code Here

        OnEvent annotation = newOnEvent();

        String[] eventTypes = new String[]
        { "gnip", "gnop" };

        MethodSignature signature = new MethodSignature("foo");

        train_findMethods(ct, signature);

        train_getMethodAnnotation(ct, signature, OnEvent.class, annotation);
View Full Code Here

    public void by_convention_on_event_type()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();

        MethodSignature signature = new MethodSignature("onSubmit");

        train_findMethods(ct, signature);

        train_getMethodAnnotation(ct, signature, OnEvent.class, null);
View Full Code Here

        OnEvent annotation = newOnEvent();

        String[] componentIds = new String[]
        { "zork" };

        MethodSignature signature = new MethodSignature("foo");

        train_findMethods(ct, signature);

        train_getMethodAnnotation(ct, signature, OnEvent.class, annotation);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.MethodSignature

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.