Acquire a MethodDesc from a type descriptor.
1308
public static MethodDesc forDescriptor(String desc) 
        throws IllegalArgumentException
    {
        try {
            int cursor = 0;
            char c;

            if ((c = desc.charAt(cursor++)) != '(') {
                throw invalidDescriptor(desc);
            }

            StringBuffer buf = new StringBuffer();
            List<TypeDesc> list = new ArrayList<TypeDesc>();

            while ((c = desc.charAt(cursor++)) != ')') {
                switch (c) {
                case 'V':
                case 'I':
                case 'C':
                case 'Z':
                case 'D':
                case 'F':
                case 'J':
                case 'B':
                case 'S':
                    buf.append(c);
                    break;
                case '[':
                    buf.append(c);
                    continue;
                case 'L':
                    while (true) {
                        buf.append(c);
                        if (c == ';') {
                            break;
                        }
                        c = desc.charAt(cursor++);
                    }
                    break;
                default:
                    throw invalidDescriptor(desc);
                }

                list.add(TypeDesc.forDescriptor(buf.toString()));
                buf.setLength(0);
            }

            TypeDesc ret = TypeDesc.forDescriptor(desc.substring(cursor));

            TypeDesc[] tds = list.toArray(new TypeDesc[list.size()]);

            return intern(new MethodDesc(desc, ret, tds));
        } catch (NullPointerException e) {
            throw invalidDescriptor(desc);
        } catch (IndexOutOfBoundsException e) {
            throw invalidDescriptor(desc);
        }
    }
138688
public static MethodHandle of(MethodDescription.InDefinedShape methodDescription) {
            return new MethodHandle(HandleType.of(methodDescription),
                    methodDescription.getDeclaringType().asErasure(),
                    methodDescription.getInternalName(),
                    methodDescription.getReturnType().asErasure(),
                    methodDescription.getParameters().asTypeList().asErasures());
        }
622144
public static Optional<Method> getDeclaredMethod(Class type, String methodName, Class... argTypes) {
        try {
            return Optional.of(type.getDeclaredMethod(methodName, argTypes));
        } catch (NoSuchMethodException e) {
            return Optional.empty();
        }
    }
1315827
public static Method getDeclaredMethod(final Class cls, final String methodName) {
		return getMethod(cls, methodName, true);
	}
140431
def _modeldesc_from_dict(self, d):
        """"""
        lhs_termlist = [Term([LookupFactor(d['lhs_termlist'][0])])]
        rhs_termlist = []
        for name in d['rhs_termlist']:
            if name == '':
                rhs_termlist.append(Term([]))
            else:
                rhs_termlist.append(Term([LookupFactor(name)]))

        md = ModelDesc(lhs_termlist, rhs_termlist)
        return md
124696
public static Method getDeclaredMethod(Class<?> type, String methodName, Class<?>... parameterTypes) {
        Method method = null;
        try {
            method = type.getDeclaredMethod(methodName, parameterTypes);
            if(method.isBridge()){
                method = MethodProvider.getInstance().unbride(method, type);
            }
        } catch (NoSuchMethodException e) {
            Class<?> superclass = type.getSuperclass();
            if (superclass != null) {
                method = getDeclaredMethod(superclass, methodName, parameterTypes);
            }
        } catch (ClassNotFoundException e) {
            Throwables.propagate(e);
        } catch (IOException e) {
            Throwables.propagate(e);
        }
        return method;
    }
78109
public static Type getReturnType(final String methodDescriptor) {
    // Skip the first character, which is always a '('.
    int currentOffset = 1;
    // Skip the argument types, one at a each loop iteration.
    while (methodDescriptor.charAt(currentOffset) != ')') {
      while (methodDescriptor.charAt(currentOffset) == '[') {
        currentOffset++;
      }
      if (methodDescriptor.charAt(currentOffset++) == 'L') {
        while (methodDescriptor.charAt(currentOffset++) != ';') {
          // Skip the argument descriptor content.
        }
      }
    }
    return getType(methodDescriptor, currentOffset + 1, methodDescriptor.length());
  }
277184
private MethodCode getGetDescriptorMethodCode() {
        String descriptorClsName = ClassHelper.getInternalName(Descriptor.class.getCanonicalName());

        MethodCode mc = new MethodCode();
        mc.setName("getDescriptor");
        mc.setReturnType(descriptorClsName);
        mc.setScope(ClassCode.SCOPE_PUBLIC);
        mc.addException("IOException");

        String methodSource = CodeTemplate.descriptorMethodSource(cls);

        mc.appendLineCode0(methodSource);
        return mc;
    }
1008601
public static String descriptor(Type type, Types types) {
    SigGen sig = new SigGen(types);
    sig.assembleSig(types.erasure(type));
    return sig.toString();
  }
1350995
public static PHPMethodDescriptor findMethod(PHPClassDescriptor desc, String methodName) {
		PHPMethodDescriptor meth;
		meth = desc.getMethod(Helper.formatProcedureName(methodName));
		if (meth != null) {
			return meth;
		}
		meth = desc.getMethod("get" + Helper.formatProcedureName(methodName));
		if (meth != null) {
			return meth;
		}
		return null;
	}
252508
public static Method getMethod(Class<?> cls, String methodName, Class<?>... types) {
        try {
            return cls.getMethod(methodName, types);
        } catch (Exception e) {
            return null;
        }
    }
521017
def get_method(self, name, entry_point, protocol):
        """"""

        if name in self._registry and self._registry[name].is_valid_for(entry_point, protocol):
            return self._registry[name]

        return None
1041787
def get_model(method):
    """"""

    @wraps(method)
    def wrapper(migrator, model, *args, **kwargs):
        if isinstance(model, str):
            return method(migrator, migrator.orm[model], *args, **kwargs)
        return method(migrator, model, *args, **kwargs)
    return wrapper
1044677
private JMethod getMethodsMap(MethodType type, JFieldVar field, ClassOutline co) {
        String getterBody = "return " + field.name() + ";";
        for (JMethod method : co.implClass.methods()) {
            String name = method.name();
            if (method.type().isPrimitive()) {
                if (MethodType.GETTER == type && (name.startsWith("is") || name.startsWith("get"))) {
                    JStatement o = (JStatement) method.body().getContents().get(0);
                    String s = getterBody(o);
                    if (s.trim().equals(getterBody)) {
                        return method;
                    }
                } else if (MethodType.SETTER == type && name.startsWith("set")) {
                    JStatement o = (JStatement) method.body().getContents().get(0);
                    String s = setterBody(o);
                    if (s.startsWith("this." + field.name() + " =")) {
                        return method;
                    }
                }
            }

        }
        throw new RuntimeException("Failed to find " + type + " for " + field.name() + ", disable XReplacePrimitives and report a bug");
    }
679468
function getDesc() {
  var type = this.getType(),
      result = getValue(this, 'description');

  return (!result || type == 'Function' || type == 'unknown')
    ? result
    : ('(' + _.trim(type.replace(/\|/g, ', '), '()') + '): ' + result);
}
536218
public static String classDescriptor(Type type, Types types) {
    SigGen sig = new SigGen(types);
    sig.assembleClassSig(types.erasure(type));
    return sig.toString();
  }
396645
public Object getMethodAnalysis(Class<?> analysisClass, MethodDescriptor methodDescriptor) {
        Map<MethodDescriptor, Object> objectMap = getObjectMap(analysisClass);
        return objectMap.get(methodDescriptor);
    }