Examples of MethodDescription


Examples of org.apache.tapestry5.plastic.MethodDescription

            check();

            assert delegateProvidingMethod != null;

            // TODO: ensure same class, ensure not primitive/array type
            final MethodDescription providerDescriptor = delegateProvidingMethod.getDescription();
            final String delegateType = providerDescriptor.returnType;

            if (delegateType.equals("void") || providerDescriptor.argumentTypes.length > 0)
                throw new IllegalArgumentException(
                        String.format(
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

        }

        private void introduceAccessorMethod(String returnType, String name, String[] parameterTypes, String signature,
                InstructionBuilderCallback callback)
        {
            MethodDescription description = new MethodDescription(ACC_PUBLIC, returnType, name, parameterTypes,
                    signature, null);

            String desc = nameCache.toDesc(description);

            if (methodBundle.isImplemented(name, desc))
                throw new IllegalArgumentException(String.format(
                        "Unable to create new accessor method %s on class %s as the method is already implemented.",
                        description.toString(), className));

            introduceMethod(description, callback);
        }
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

            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()
        {
            public void doBuild(InstructionBuilder builder)
            {
                builder.loadThis().getField(delegateField);
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

    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

Examples of org.apache.tapestry5.plastic.MethodDescription

        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

Examples of org.apache.tapestry5.plastic.MethodDescription

        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

Examples of org.apache.tapestry5.plastic.MethodDescription

        }
    }

    private static MethodDescription getMethodDescription(Class containingClass, String name, Class... parameterTypes)
    {
        return new MethodDescription(getMethod(containingClass, name, parameterTypes));
    }
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.description.MethodDescription

      throws Exception {
    for (ASTNode node : javaInfo.getRelatedNodes()) {
      MethodInvocation invocation = javaInfo.getMethodInvocation(node);
      if (invocation != null) {
        String methodSignature = AstNodeUtils.getMethodSignature(invocation);
        MethodDescription methodDescription = javaInfo.getDescription().getMethod(methodSignature);
        if (methodDescription != null
            && methodDescription.getName().startsWith("set")
            && methodDescription.getParameters().size() > 2
            && methodDescription.getParameter(0).getType() == int.class
            && methodDescription.getParameter(1).getType() == int.class
            && methodDescription.getParameter(0).getTags().containsKey("HTMLTable.row")
            && methodDescription.getParameter(1).getTags().containsKey("HTMLTable.cell")) {
          List<Expression> arguments = DomGenerics.arguments(invocation);
          Expression rowExpression = arguments.get(0);
          Expression cellExpression = arguments.get(1);
          int row = (Integer) JavaInfoEvaluationHelper.getValue(rowExpression);
          int cell = (Integer) JavaInfoEvaluationHelper.getValue(cellExpression);
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.description.MethodDescription

      }
    }
    // visit methods
    for (MethodInvocation invocation : javaInfo.getMethodInvocations()) {
      String methodSignature = AstNodeUtils.getMethodSignature(invocation);
      MethodDescription methodDescription = javaInfo.getDescription().getMethod(methodSignature);
      if (methodDescription != null) {
        List<Expression> arguments = DomGenerics.arguments(invocation);
        for (ParameterDescription parameter : methodDescription.getParameters()) {
          if (parameter.hasTrueTag(tagName)) {
            visitTaggedParameter(visitor, methodDescription, arguments, parameter);
          }
        }
      }
View Full Code Here

Examples of org.jplastic.core.MethodDescription

    public PlasticMethod introduceMethod(Method method)
    {
        check();

        return introduceMethod(new MethodDescription(method).withModifiers(method.getModifiers() & ~Modifier.ABSTRACT));
    }
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.