Determines the methods normally allowed for the resource.

@param so StoredObject representing the resource
@return all allowed methods, separated by commas
19966
protected static String determineMethodsAllowed( StoredObject so ) {

        try {
            if (so != null) {
                if (so.isNullResource()) {

                    return NULL_RESOURCE_METHODS_ALLOWED;

                } else if (so.isFolder()) {
                    return RESOURCE_METHODS_ALLOWED + FOLDER_METHOD_ALLOWED;
                }
                // else resource
                return RESOURCE_METHODS_ALLOWED;
            }
        } catch (Exception e) {
            // we do nothing, just return less allowed methods
        }

        return LESS_ALLOWED_METHODS;
    }
126518
static boolean isGetterMethod(final Method method) {
        return (method.getName().startsWith(GETTER_GET_METHOD_PREFIX)
                || method.getName().startsWith(GETTER_IS_METHOD_PREFIX))
                &&
                !Void.TYPE.isAssignableFrom(method.getReturnType())
                &&
                !method.isVarArgs()
                &&
                method.getParameterTypes().length == 0;
    }
858357
@SuppressWarnings("unchecked")
    public Method[] findAdaptMethodsTo(Class to) {
        Method[] methods = mAdaptMethods;
        List<Method> candidates = new ArrayList<Method>(methods.length);
        for (int i=methods.length; --i>=0; ) {
            Method method = methods[i];
            if (to.isAssignableFrom(method.getReturnType())) {
                candidates.add(method);
            }
        }
        reduceCandidates(candidates, to);
        return (Method[]) candidates.toArray(new Method[candidates.size()]);
    }
1102204
List<Method> getSortedCandidateMethods(String methodName, Method[] methods) {
		List<Method> candidates = new ArrayList<>();
		for (Method method : methods) {
			if (method.getName().equals(methodName)) {
				candidates.add(method);
			}
		}
		Collections.sort(candidates, comparator);
		return candidates;
	}
1253331
public Method getMethod(Method method) {
        return getMethod(method.getReturnType(), method.getName(), method.getParameterTypes());
    }
817180
protected ISFSObject parseObject(GetterMethodCover method, 
            Object object) {
        return object2params(method.getReturnClass(), 
                object);
    }
599294
static ImmutableSet<ExecutableElement> prefixedGettersIn(Iterable<ExecutableElement> methods) {
    ImmutableSet.Builder<ExecutableElement> getters = ImmutableSet.builder();
    for (ExecutableElement method : methods) {
      String name = method.getSimpleName().toString();
      // Note that getfoo() (without a capital) is still a getter.
      boolean get = name.startsWith("get") && !name.equals("get");
      boolean is =
          name.startsWith("is")
              && !name.equals("is")
              && method.getReturnType().getKind() == TypeKind.BOOLEAN;
      if (get || is) {
        getters.add(method);
      }
    }
    return getters.build();
  }
990195
public MethodDoc[] serializationMethods() {
        if (serializedForm == null) {
            serializedForm = new SerializedForm(env, tsym, this);
        }
        //### Clone this?
        return serializedForm.methods();
    }
69851
private boolean isOperationMethod(Method method) {
    Class<?>[] paramTypes = method.getParameterTypes();
    return paramTypes.length == 1 && paramTypes[0] == Commit.class;
  }
834238
public DocumentSymbol toDocumentSymbol(final EObject object) {
    DocumentSymbol _documentSymbol = new DocumentSymbol();
    final Procedure1<DocumentSymbol> _function = (DocumentSymbol it) -> {
      final String objectName = this.nameProvider.getName(object);
      if ((objectName != null)) {
        it.setName(objectName);
      }
      final SymbolKind objectKind = this.kindProvider.getSymbolKind(object);
      if ((objectKind != null)) {
        it.setKind(objectKind);
      }
      final Range objectRange = this.rangeProvider.getRange(object);
      if ((objectRange != null)) {
        it.setRange(objectRange);
      }
      final Range objectSelectionRange = this.rangeProvider.getSelectionRange(object);
      if ((objectSelectionRange != null)) {
        it.setSelectionRange(objectSelectionRange);
      }
      it.setDetail(this.detailsProvider.getDetails(object));
      it.setDeprecated(Boolean.valueOf(this.deprecationInfoProvider.isDeprecated(object)));
      it.setChildren(CollectionLiterals.<DocumentSymbol>newArrayList());
    };
    return ObjectExtensions.<DocumentSymbol>operator_doubleArrow(_documentSymbol, _function);
  }
640766
public static boolean isObjectMethod(Method method) {
		if (method == null) {
			return false;
		}
		try {
			Object.class.getDeclaredMethod(method.getName(), method.getParameterTypes());
			return true;
		}
		catch (Exception ex) {
			return false;
		}
	}
1357152
@Override
    public List<org.fcrepo.server.types.gen.ObjectMethodsDef> listMethods(String pid,
                                                                               String asOfDateTime) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.storage.types.ObjectMethodsDef[] objectMethodDefs =
                    m_access.listMethods(context, pid, DateUtility
                            .parseDateOrNull(asOfDateTime));
            return TypeUtility
                    .convertObjectMethodsDefArrayToGenObjectMethodsDefList(objectMethodDefs);
        } catch (Throwable th) {
            LOG.error("Error listing methods", th);
            throw CXFUtility.getFault(th);
        }
    }
209314
public Set<Method> getMethodsAnnotatedWith(final Class<? extends Annotation> annotation) {
        Iterable<String> methods = store.get(index(MethodAnnotationsScanner.class), annotation.getName());
        return getMethodsFromDescriptors(methods, loaders());
    }
601951
public JMethod []getDeclaredMethods()
  {
    ArrayList<JavaMethod> methodList = getMethodList();
    
    JMethod[] methods = new JMethod[methodList.size()];

    methodList.toArray(methods);

    return methods;
  }
1141003
private static List<Method> getMethodsList(final Class cls, final boolean declared) {
		$.checkNotNull(cls);

		final List<Method> allMethods = new ArrayList<Method>();
		Class currentClass = cls;
		while (currentClass != null) {
			final Method[] methods = declared ? currentClass.getDeclaredMethods() : currentClass.getMethods();
			for (Method method : methods) {
				allMethods.add(method);
			}
			currentClass = currentClass.getSuperclass();
		}
		return allMethods;
	}
625330
private static Object filterPropertyMethod(Object methodOrList, boolean isGetter, boolean booleanGetter) {
        // Method has been optimized to reach a target of 325 bytecode size, making it JIT'able
        Object ret = null;

        if (methodOrList instanceof MetaMethod) {
            MetaMethod element = (MetaMethod)methodOrList;
            int parameterCount = element.getParameterTypes().length;
            if (!isGetter &&
                    //(element.getReturnType() == Void.class || element.getReturnType() == Void.TYPE) &&
                    parameterCount == 1) {
                ret = element;
            }
            Class returnType = element.getReturnType();
            if (isGetter &&
                    !(returnType == Void.class || returnType == Void.TYPE) &&
                    (!booleanGetter || returnType == Boolean.class || returnType == Boolean.TYPE) &&
                    parameterCount == 0) {
                ret = element;
            }
        }
        if (methodOrList instanceof FastArray) {
            FastArray methods = (FastArray) methodOrList;
            final int len = methods.size();
            final Object[] data = methods.getArray();
            for (int i = 0; i != len; ++i) {
                MetaMethod element = (MetaMethod) data[i];
                int parameterCount = element.getParameterTypes().length;
                if (!isGetter &&
                        //(element.getReturnType() == Void.class || element.getReturnType() == Void.TYPE) &&
                        parameterCount == 1) {
                    ret = addElementToList(ret, element);
                }
                Class returnType = element.getReturnType();
                if (isGetter &&
                        !(returnType == Void.class || returnType == Void.TYPE) &&
                        parameterCount == 0) {
                    ret = addElementToList(ret, element);
                }
            }
        }

        if (ret == null
                || (ret instanceof MetaMethod)
                || !isGetter) {
            return ret;
        }

        // we found multiple matching methods
        // this is a problem, because we can use only one
        // if it is a getter, then use the most general return
        // type to decide which method to use. If it is a setter
        // we use the type of the first parameter
        MetaMethod method = null;
        int distance = -1;
        for (final Object o : ((List) ret)) {
            MetaMethod element = (MetaMethod) o;
            int localDistance = distanceToObject(element.getReturnType());
            //TODO: maybe implement the case localDistance==distance
            if (distance == -1 || distance > localDistance) {
                distance = localDistance;
                method = element;
            }
        }
        return method;
    }
92494
public GroovyMethodDoc[] methods() {
        Collections.sort(methods);
        return methods.toArray(new GroovyMethodDoc[methods.size()]);
    }