Examples of MethodMetadata


Examples of com.cuubez.core.resource.metaData.MethodMetaData

        if (Modifier.isStatic(modifier) || !Modifier.isPublic(modifier)) {
            return null;
        }

        MethodMetaData methodMetaData = new MethodMetaData();
        methodMetaData.setReflectionMethod(method);

        if (!scanHttpMethod(methodMetaData, method)) {
            return null;
        }
        scanPath(methodMetaData, method);
        scanConsume(methodMetaData, method);
        scanProduce(methodMetaData, method);
        methodMetaData.setClazz(clazz);
        return methodMetaData;
    }
View Full Code Here

Examples of com.liferay.faces.util.view.facelets.MethodMetadata

      if ((metadataTarget != null) && (metadataTarget.isTargetInstanceOf(InputFile.class))) {

        if (FILE_UPLOAD_LISTENER.equals(name)) {
          Method writeMethod = metadataTarget.getWriteMethod(name);
          Class<?>[] args = new Class[] { FileUploadEvent.class };
          metadata = new MethodMetadata(tagAttribute, writeMethod, args);
        }
      }

      return metadata;
    }
View Full Code Here

Examples of feign.MethodMetadata

  public static final class JAXRSContract extends Contract.BaseContract {

    @Override
    public MethodMetadata parseAndValidatateMetadata(Method method) {
      MethodMetadata md = super.parseAndValidatateMetadata(method);
      Path path = method.getDeclaringClass().getAnnotation(Path.class);
      if (path != null) {
        String pathValue = emptyToNull(path.value());
        checkState(pathValue != null, "Path.value() was empty on type %s", method.getDeclaringClass().getName());
        if (!pathValue.startsWith("/")) {
            pathValue = "/" + pathValue;
        }
        md.template().insert(0, pathValue);
      }
      return md;
    }
View Full Code Here

Examples of org.apache.felix.ipojo.parser.MethodMetadata

            String[] signature) throws MBeanException, ReflectionException {

        MethodField method = m_configMap.getMethodFromName(operationName,
            signature);
        if (method != null) {
            MethodMetadata methodCall = method.getMethod();
            Callback mc = new Callback(methodCall, m_instanceManager);
            try {
                return mc.call(params);
            } catch (NoSuchMethodException e) {
                throw new ReflectionException(e);
View Full Code Here

Examples of org.apache.felix.ipojo.parser.MethodMetadata

                } else {
                    callbackType = subscriberMetadata.getDataType().getName();
                }

                // Check the event callback method is present
                MethodMetadata methodMetadata = pojoMetadata.getMethod(
                        subscriberMetadata.getCallback(),
                        new String[] { callbackType });
                String callbackSignature = subscriberMetadata.getCallback()
                        + "(" + callbackType + ")";
                if (methodMetadata == null) {
View Full Code Here

Examples of org.apache.felix.ipojo.parser.MethodMetadata

                } else {
                    callbackType = subscriberMetadata.getDataType().getName();
                }

                // Create the specified callback and register it
                MethodMetadata methodMetadata = pojoMetadata.getMethod(
                        subscriberMetadata.getCallback(),
                        new String[] { callbackType });
                Callback callback = new Callback(methodMetadata, m_manager);
                m_callbacksByName.put(name, callback);
View Full Code Here

Examples of org.apache.felix.ipojo.parser.MethodMetadata

            String eorb = sub[i].getAttribute(EXCEPTIONONROLLBACK_ATTRIBUTE);

            if (method == null) {
                throw new ConfigurationException("A transactional element must specified the method attribute");
            }
            MethodMetadata meta = this.getPojoMetadata().getMethod(method);
            if (meta == null) {
                throw new ConfigurationException("A transactional method is not in the pojo class : " + method);
            }

            int timeout = 0;
View Full Code Here

Examples of org.apache.felix.ipojo.parser.MethodMetadata

          throw new ConfigurationException("Invalid property definition "  + definition.getName()+ ": the specified field does not exist");

      }

      if (definition.getCallback() != null) {
        MethodMetadata method = getPojoMetadata().getMethod(definition.getCallback());
        if (method == null)
          throw new ConfigurationException("Invalid property definition "  + definition.getName() + ": the specified method does not exist");
      }
    }
  }
View Full Code Here

Examples of org.apache.felix.ipojo.parser.MethodMetadata

    /*
     * Try to use iPojo metadata
     */

    MethodMetadata methodIPojoMetadata = null;
    if (pojoMetadata != null) {
      for (MethodMetadata method : pojoMetadata.getMethods(methodName)) {

        String arguments[] = method.getMethodArguments();
        boolean match = (1 == arguments.length);
        if (match) {
          methodIPojoMetadata = method;
        }
      }
    }


    if (methodIPojoMetadata != null) {
      return boxed(methodIPojoMetadata.getMethodArguments()[0]);
    }

    throw new NoSuchMethodException("unavailable metadata for method " + methodName);

  }
View Full Code Here

Examples of org.apache.felix.ipojo.parser.MethodMetadata

    /*
     * Try to use iPojo metadata
     */
   
    MethodMetadata methodIPojoMetadata = null;
    if (pojoMetadata != null) {
      for (MethodMetadata method : pojoMetadata.getMethods(methodName)) {

        if (methodSignature == null) {
          methodIPojoMetadata = method;
          break;
        }

        String signature[] = methodSignature.split(",");
        String arguments[] = method.getMethodArguments();
        boolean match = (signature.length == arguments.length);

        for (int i = 0; match && i < signature.length; i++) {
          if (!signature[i].equals(arguments[i])) {
            match = false;
          }
        }

        if (match) {
          methodIPojoMetadata = method;
          break;
        }
      }
    }

    if (methodIPojoMetadata != null) {
      return boxed(methodIPojoMetadata.getMethodReturn());
    }

    throw new NoSuchMethodException("unavailable metadata for method " + methodName + "(" + methodSignature != null ? methodSignature : "" + ")");

  }
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.