Get {@link MethodMetadata}

@param methodDeclaration
@return methodTypeMemberMetadata
339042
@SuppressWarnings( "unchecked" )
    protected MethodMetadata getMethodTypeMemberMetadataFrom( MethodDeclaration methodDeclaration ) {
        MethodMetadata methodTypeMemberMetadata = MethodMetadata.methodMemberType(JavaMetadataUtil.getName(methodDeclaration.getName()));
        processReturnTypeOfMethodDeclaration(methodDeclaration, methodTypeMemberMetadata);
        processModifiersOfMethodDeclaration(methodDeclaration, methodTypeMemberMetadata);
        processParametersOfMethodDeclaration(methodDeclaration, methodTypeMemberMetadata);
        List<SingleVariableDeclaration> params = methodDeclaration.parameters();
        for (SingleVariableDeclaration singleVariableDeclaration : params) {
            singleVariableDeclaration.getName();
        }
        return methodTypeMemberMetadata;
    }
1279800
private static String getClassMethod(Class clazz, Method method) {
		StringBuilder builder = new StringBuilder();
		builder.append(clazz.getName()).append(".").append(method.getName());
		builder.append("(");
		if (method.getParameterCount() > 0) {
			for (int i = 0; i < method.getParameterCount(); i++) {
				Parameter param = method.getParameters()[i];
				builder.append(param.getType().getSimpleName()).append(" ").append(param.getName());

				if (i + 1 < method.getParameterCount()) {
					builder.append(", ");
				}
			}
		}
		builder.append(")");
		return builder.toString();
	}
610463
public static String methodDescriptor(MethodNode mNode) {
        StringBuilder sb = new StringBuilder(mNode.getName().length() + mNode.getParameters().length * 10);
        sb.append(mNode.getReturnType().getName());
        sb.append(' ');
        sb.append(mNode.getName());
        sb.append('(');
        for (int i = 0; i < mNode.getParameters().length; i++) {
            if (i > 0) {
                sb.append(", ");
            }
            Parameter p = mNode.getParameters()[i];
            sb.append(ClassNodeUtils.formatTypeName(p.getType()));
        }
        sb.append(')');
        return sb.toString();
    }
1343007
public Content getTableCaption(Set<MethodTypes> methodTypes) {
        Content tabbedCaption = new HtmlTree(HtmlTag.CAPTION);
        for (MethodTypes type : methodTypes) {
            Content captionSpan;
            Content span;
            if (type.tableTabs().isDefaultTab()) {
                captionSpan = HtmlTree.SPAN(configuration.getContent(type.tableTabs().resourceKey()));
                span = HtmlTree.SPAN(type.tableTabs().tabId(),
                        HtmlStyle.activeTableTab, captionSpan);
            } else {
                captionSpan = HtmlTree.SPAN(getMethodTypeLinks(type));
                span = HtmlTree.SPAN(type.tableTabs().tabId(),
                        HtmlStyle.tableTab, captionSpan);
            }
            Content tabSpan = HtmlTree.SPAN(HtmlStyle.tabEnd, Contents.SPACE);
            span.addContent(tabSpan);
            tabbedCaption.addContent(span);
        }
        return tabbedCaption;
    }
1129096
public String getMethodAsString() {
        if (! (method instanceof ConstantExpression)) return null;
        ConstantExpression constant = (ConstantExpression) method;
        return constant.getText();
    }
1315827
public static Method getDeclaredMethod(final Class cls, final String methodName) {
		return getMethod(cls, methodName, true);
	}
842211
private static Method getMethod(final Class cls, final String methodName, boolean declared) {
		$.checkNotEmpty(methodName);
		List<Method> methods = getMethodsList(cls, declared);
		for (int i = 0; i < methods.size(); i++) {
			if (methodName.equals(methods.get(i).getName())) {
				return methods.get(i);
			}
		}
		return null;
	}
137523
public static String[] getMethodParameterNames(Class<?> declaringClass, final Method method) {
        final Class<?>[] parameterTypes = method.getParameterTypes();
        if (parameterTypes == null || parameterTypes.length == 0) {
            return new String[0];
        }

        Map<Member, String[]> map = parameterNamesCache.get(declaringClass);
        if (map == null) {
            map = inspectClass(declaringClass);
            parameterNamesCache.put(declaringClass, map);
        }
        if (map != NO_DEBUG_INFO_MAP) {
            return map.get(method);
        }
        return null;
    }
517010
static Method getMethod(Class<?> type, Method m) {
        if (m == null || Modifier.isPublic(type.getModifiers())) {
            return m;
        }
        Class<?>[] inf = type.getInterfaces();
        Method mp = null;
        for (int i = 0; i < inf.length; i++) {
            try {
                mp = inf[i].getMethod(m.getName(), m.getParameterTypes());
                mp = getMethod(mp.getDeclaringClass(), mp);
                if (mp != null) {
                    return mp;
                }
            } catch (NoSuchMethodException e) {
                // Ignore
            }
        }
        Class<?> sup = type.getSuperclass();
        if (sup != null) {
            try {
                mp = sup.getMethod(m.getName(), m.getParameterTypes());
                mp = getMethod(mp.getDeclaringClass(), mp);
                if (mp != null) {
                    return mp;
                }
            } catch (NoSuchMethodException e) {
                // Ignore
            }
        }
        return null;
    }
797575
protected HashMap getMethodMap(Class cl)
    {
        HashMap methodMap = new HashMap();

        for (; cl != null; cl = cl.getSuperclass()) {
            Method[] methods = cl.getDeclaredMethods();

            for (int i = 0; i < methods.length; i++) {
                Method method = methods[i];

                if (Modifier.isStatic(method.getModifiers()))
                    continue;

                String name = method.getName();

                if (!name.startsWith("set"))
                    continue;

                Class[] paramTypes = method.getParameterTypes();
                if (paramTypes.length != 1)
                    continue;

                if (!method.getReturnType().equals(void.class))
                    continue;

                if (findGetter(methods, name, paramTypes[0]) == null)
                    continue;

                // XXX: could parameterize the handler to only deal with public
                try {
                    method.setAccessible(true);
                } catch (Throwable e) {
                    e.printStackTrace();
                }

                name = name.substring(3);

                int j = 0;
                for (; j < name.length() && Character.isUpperCase(name.charAt(j)); j++) {
                }

                if (j == 1)
                    name = name.substring(0, j).toLowerCase(Locale.ENGLISH) + name.substring(j);
                else if (j > 1)
                    name = name.substring(0, j - 1).toLowerCase(Locale.ENGLISH) + name.substring(j - 1);

                methodMap.put(name, method);
            }
        }

        return methodMap;
    }
1216523
public String getMethodSignature() {
        if (method != null) {
            String methodSignature = method.toString();
            return methodSignature.replaceFirst("public void ", "");
        }
        return null;
    }
20264
private static MethodDescriptor[] getMdescriptor() {
    final MethodDescriptor[] methods = new MethodDescriptor[36];

    try {
      methods[METHOD_addAttribute0] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("addAttribute", new Class[] {
              java.lang.String.class, java.lang.Object.class})); // NOI18N
      methods[METHOD_addAttribute0].setDisplayName("");
      methods[METHOD_addAttribute1] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("addAttribute", new Class[] {
              java.lang.String.class, int.class, java.lang.Object.class})); // NOI18N
      methods[METHOD_addAttribute1].setDisplayName("");
      methods[METHOD_addChild2] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("addChild", new Class[] {
              java.lang.String.class, com.google.protobuf.Message.class})); // NOI18N
      methods[METHOD_addChild2].setDisplayName("");
      methods[METHOD_addChild3] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("addChild",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_addChild3].setDisplayName("");
      methods[METHOD_addChild4] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("addChild", new Class[] {
              java.lang.String.class, int.class, com.google.protobuf.Message.class})); // NOI18N
      methods[METHOD_addChild4].setDisplayName("");
      methods[METHOD_addChild5] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("addChild", new Class[] {
              java.lang.String.class, int.class})); // NOI18N
      methods[METHOD_addChild5].setDisplayName("");
      methods[METHOD_build6] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("build", new Class[] {})); // NOI18N
      methods[METHOD_build6].setDisplayName("");
      methods[METHOD_buildPartial7] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("buildPartial",
              new Class[] {})); // NOI18N
      methods[METHOD_buildPartial7].setDisplayName("");
      methods[METHOD_clear8] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("clear", new Class[] {})); // NOI18N
      methods[METHOD_clear8].setDisplayName("");
      methods[METHOD_clone9] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("clone", new Class[] {})); // NOI18N
      methods[METHOD_clone9].setDisplayName("");
      methods[METHOD_getAttribute10] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("getAttribute",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_getAttribute10].setDisplayName("");
      methods[METHOD_getAttribute11] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("getAttribute", new Class[] {
              java.lang.String.class, int.class})); // NOI18N
      methods[METHOD_getAttribute11].setDisplayName("");
      methods[METHOD_getChild12] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("getChild",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_getChild12].setDisplayName("");
      methods[METHOD_getChild13] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("getChild", new Class[] {
              java.lang.String.class, int.class})); // NOI18N
      methods[METHOD_getChild13].setDisplayName("");
      methods[METHOD_isAttribute14] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("isAttribute",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_isAttribute14].setDisplayName("");
      methods[METHOD_isFieldIndexed15] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("isFieldIndexed",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_isFieldIndexed15].setDisplayName("");
      methods[METHOD_mergeFrom16] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("mergeFrom",
              new Class[] {com.google.protobuf.Message.class})); // NOI18N
      methods[METHOD_mergeFrom16].setDisplayName("");
      methods[METHOD_newSavePoint17] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("newSavePoint",
              new Class[] {})); // NOI18N
      methods[METHOD_newSavePoint17].setDisplayName("");
      methods[METHOD_removeAttribute18] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("removeAttribute",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_removeAttribute18].setDisplayName("");
      methods[METHOD_removeAttribute19] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("removeAttribute",
              new Class[] {java.lang.String.class, int.class})); // NOI18N
      methods[METHOD_removeAttribute19].setDisplayName("");
      methods[METHOD_removeChild20] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("removeChild",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_removeChild20].setDisplayName("");
      methods[METHOD_removeChild21] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("removeChild", new Class[] {
              java.lang.String.class, int.class})); // NOI18N
      methods[METHOD_removeChild21].setDisplayName("");
      methods[METHOD_setAttribute24] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("setAttribute", new Class[] {
              java.lang.String.class, java.lang.Object.class})); // NOI18N
      methods[METHOD_setAttribute24].setDisplayName("");
      methods[METHOD_setAttribute25] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("setAttribute", new Class[] {
              java.lang.String.class, int.class, java.lang.Object.class})); // NOI18N
      methods[METHOD_setAttribute25].setDisplayName("");
      methods[METHOD_setChild26] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("setChild", new Class[] {
              java.lang.String.class, com.google.protobuf.Message.class})); // NOI18N
      methods[METHOD_setChild26].setDisplayName("");
      methods[METHOD_setChild27] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("setChild",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_setChild27].setDisplayName("");
      methods[METHOD_setChild28] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("setChild", new Class[] {
              java.lang.String.class, int.class, com.google.protobuf.Message.class})); // NOI18N
      methods[METHOD_setChild28].setDisplayName("");
      methods[METHOD_setChild29] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("setChild", new Class[] {
              java.lang.String.class, int.class})); // NOI18N
      methods[METHOD_setChild29].setDisplayName("");
      methods[METHOD_size30] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("size", new Class[] {})); // NOI18N
      methods[METHOD_size30].setDisplayName("");
      methods[METHOD_toChild31] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("toChild",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_toChild31].setDisplayName("");
      methods[METHOD_toChild32] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("toChild", new Class[] {
              java.lang.String.class, int.class})); // NOI18N
      methods[METHOD_toChild32].setDisplayName("");
      methods[METHOD_toLastChild33] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("toLastChild",
              new Class[] {java.lang.String.class})); // NOI18N
      methods[METHOD_toLastChild33].setDisplayName("");
      methods[METHOD_toParent34] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("toParent", new Class[] {})); // NOI18N
      methods[METHOD_toParent34].setDisplayName("");
      methods[METHOD_toRoot35] =
          new MethodDescriptor(DynamicMessage.Builder.class.getMethod("toRoot", new Class[] {})); // NOI18N
      methods[METHOD_toRoot35].setDisplayName("");
    } catch (final Exception e) {
    }// GEN-HEADEREND:Methods
     // Here you can add code for customizing the methods array.

    return methods;
  }
1253331
public Method getMethod(Method method) {
        return getMethod(method.getReturnType(), method.getName(), method.getParameterTypes());
    }
396645
public Object getMethodAnalysis(Class<?> analysisClass, MethodDescriptor methodDescriptor) {
        Map<MethodDescriptor, Object> objectMap = getObjectMap(analysisClass);
        return objectMap.get(methodDescriptor);
    }
547707
public MethodDeclaration getMethod(String name, String signature) {
    for (EntityDeclaration node : type.getMembers()) {
      if (node.getEntityType() == EntityType.METHOD) {
        MethodDeclaration method = (MethodDeclaration) node;
        if (method.getName().equals(name) && signature.equals(signature(method))) {
          return method;
        }
      }
    }
    return null;
  }
1374995
private MethodMetaData<? extends Annotation> getMethodMetaData(Method method) {
      MethodMetaData<? extends Annotation> methodMetaData = methodMetaDataCache.get(method);

      if (methodMetaData == null) {
         final String cacheName;
         final Annotation cacheAnnotation;
         final AggregatedParameterMetaData aggregatedParameterMetaData;
         final CacheKeyGenerator cacheKeyGenerator;
         final CacheDefaults cacheDefaultsAnnotation = method.getDeclaringClass().getAnnotation(CacheDefaults.class);

         if (method.isAnnotationPresent(CacheResult.class)) {
            final CacheResult cacheResultAnnotation = method.getAnnotation(CacheResult.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cacheResultAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cacheResultAnnotation.cacheName(), cacheDefaultsAnnotation, true);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheResultAnnotation;

         } else if (method.isAnnotationPresent(CacheRemove.class)) {
            final CacheRemove cacheRemoveEntryAnnotation = method.getAnnotation(CacheRemove.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cacheRemoveEntryAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cacheRemoveEntryAnnotation.cacheName(), cacheDefaultsAnnotation, false);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheRemoveEntryAnnotation;

            if (cacheName.isEmpty()) {
               throw log.cacheRemoveEntryMethodWithoutCacheName(method.getName());
            }

         } else if (method.isAnnotationPresent(CacheRemoveAll.class)) {
            final CacheRemoveAll cacheRemoveAllAnnotation = method.getAnnotation(CacheRemoveAll.class);
            cacheKeyGenerator = null;
            cacheName = getCacheName(method, cacheRemoveAllAnnotation.cacheName(), cacheDefaultsAnnotation, false);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheRemoveAllAnnotation;

            if (cacheName.isEmpty()) {
               throw log.cacheRemoveAllMethodWithoutCacheName(method.getName());
            }

         } else if (method.isAnnotationPresent(CachePut.class)) {
            final CachePut cachePutAnnotation = method.getAnnotation(CachePut.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cachePutAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cachePutAnnotation.cacheName(), cacheDefaultsAnnotation, true);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, true);
            cacheAnnotation = cachePutAnnotation;

         } else {
            throw log.methodWithoutCacheAnnotation(method.getName());
         }

         final MethodMetaData<? extends Annotation> newCacheMethodMetaData = new MethodMetaData<Annotation>(
               method,
               aggregatedParameterMetaData,
               asSet(method.getAnnotations()),
               cacheKeyGenerator,
               cacheAnnotation,
               cacheName
         );

         methodMetaData = methodMetaDataCache.putIfAbsent(method, newCacheMethodMetaData);
         if (methodMetaData == null) {
            methodMetaData = newCacheMethodMetaData;
         }
      }

      return methodMetaData;
   }
1252062
public MethodBinding getAction() {
        MethodBinding result = null;
        MethodExpression me;

        if (null != (me = getActionExpression())) {
            // if the MethodExpression is an instance of our private
            // wrapper class.
            if (me.getClass().equals(MethodExpressionMethodBindingAdapter.class)) {
                result = ((MethodExpressionMethodBindingAdapter) me).getWrapped();
            } else {
                // otherwise, this is a real MethodExpression.  Wrap it
                // in a MethodBinding.
                result = new MethodBindingMethodExpressionAdapter(me);
            }
        }
        return result;

    }