Get a method declared on this object.

@param methodIdentifier the method identifier
@return the method, or {@code null} if no method of that description exists
193488
public Method getMethod(MethodIdentifier methodIdentifier) {
        final Map<ParamNameList, Map<String, Method>> nameMap = methodsByTypeName.get(methodIdentifier.getName());
        if (nameMap == null) {
            return null;
        }
        final Map<String, Method> paramsMap = nameMap.get(createParamNameList(methodIdentifier.getParameterTypes()));
        if (paramsMap == null) {
            return null;
        }
        return paramsMap.get(methodIdentifier.getReturnType());
    }
1280237
public Subject newSubject(final String identifier, final String confirmationMethod) {
        val confirmation = newSamlObject(SubjectConfirmation.class);
        val method = newSamlObject(ConfirmationMethod.class);
        method.setConfirmationMethod(confirmationMethod);
        confirmation.getConfirmationMethods().add(method);
        val nameIdentifier = newSamlObject(NameIdentifier.class);
        nameIdentifier.setValue(identifier);
        val subject = newSamlObject(Subject.class);
        subject.setNameIdentifier(nameIdentifier);
        subject.setSubjectConfirmation(confirmation);
        return subject;
    }
229240
def getService(self, serviceIdentifier):
        
        if serviceIdentifier in self._services:
            return self._services[serviceIdentifier]
        else:
            message = "Application - getService() - " \
                      "Service with identifier {} does not exist." \
                      .format(serviceIdentifier)
            raise Exception(message)
1329735
private String getMethodName(Method method) {
        StatName statName = method.getAnnotation(StatName.class);
        return statName == null ? method.getName() : statName.value();
    }
816046
private boolean equalsSimpleTypeNames(MethodIdentifier identifier, MethodResult methodResult) {
        MethodIdentifier originalIdentifier = methodResult.getOriginalMethodSignature();

        return originalIdentifier.getMethodName().equals(identifier.getMethodName()) &&
                matchesTypeBestEffort(originalIdentifier.getReturnType(), identifier.getReturnType()) &&
                parameterMatch(originalIdentifier.getParameters(), identifier.getParameters());
    }
1173672
public Authentication getAuthenticationMethod(int methodId) {
		Object method = authMethods.get(new Integer(methodId));
		if (method == null)
			return null;
		return (Authentication) method;
	}
26144
public static ValidationResult validateIdentifier(String identifier, IdentifierType type)
   {
      if (Strings.isNullOrEmpty(identifier))
         return new ValidationResult(ERROR, Messages.notNullOrEmpty(type));
      if (isReservedWord(identifier))
      {
         return new ValidationResult(ERROR, Messages.isAJavaKeyWord(identifier));
      }
      int javaLetter = identifier.codePointAt(0);
      if (!Character.isJavaIdentifierStart(javaLetter))
      {
         return new ValidationResult(ERROR, Messages.containsInvalidCharacters(identifier));
      }
      for (int ctr = 1; ctr < identifier.length(); ctr++)
      {
         int javaLetterOrDigit = identifier.codePointAt(ctr);
         if (!Character.isJavaIdentifierPart(javaLetterOrDigit))
         {
            return new ValidationResult(ERROR, Messages.containsInvalidCharacters(identifier));
         }
      }
      if (CLASS_NAME.equals(type) && identifier.contains("$"))
      {
         return new ValidationResult(WARNING, "The use of '$' in class names is discouraged.");
      }
      else
      {
         return new ValidationResult(INFO);
      }
   }
1016088
@Override
	public String getIdentifier() {
		if (ranges.isEmpty()) return pdbId;
		return pdbId + "." + ResidueRange.toString(ranges);
	}
1100544
@Override
    public Object get(final String identifier) {
        Declaration decl = getDeclarations().get( identifier );
        if ( decl == null ) {
            throw new IllegalArgumentException( "identifier '" + identifier + "' cannot be found" );
        }
        return get( decl );
    }
604778
public static <T> Method getFunctionInterfaceMethod(Class<?> clz) {
    if (!clz.isInterface()) {
      return null;
    }
    Method[] ms = Stream.of(clz.getMethods())
        .filter(m -> !(m.isDefault() || m.isBridge() || m.isSynthetic() || Modifier.isStatic(m.getModifiers())))
        .toArray(Method[]::new);
    if (ms.length != 1) {
      return null;
    }
    return ms[0];
  }
397693
public MethodInfo getMethodInfo(final String methodName) {
        for(MethodInfo item : methodInfos) {
            if(item.getMethodName().equals(methodName)) {
                return item;
            }
        }
        
        return null;
    }
803579
public static Method getOverriddenMethod(Method method) {
        Class<?> declaringClass = method.getDeclaringClass();
        Class<?> superClass = declaringClass.getSuperclass();
        Method result = null;
        if (superClass != null && !(superClass.equals(Object.class))) {
            result = findMethod(method, superClass);
        }
        if (result == null) {
            for (Class<?> anInterface : declaringClass.getInterfaces()) {
                result = findMethod(method, anInterface);
                if (result != null) {
                    return result;
                }
            }
        }
        return result;
    }
1096677
public Method getMethod(String methodName) {
        return checkNotNull(methods().get(checkNotNull(methodName)), 
        		"The method %s is not exists of object %s", methodName, delegateClass().getName());
    }
155437
def method_descriptor(descriptor: str) -> MethodDescriptor:
    
    end_para = descriptor.find(')')
    returns = descriptor[end_para + 1:]
    args = descriptor[1:end_para]

    return MethodDescriptor(
        parse_descriptor(returns)[0],
        parse_descriptor(args),
        returns,
        args,
        descriptor
    )
1186125
public static PropertyIdentifier getIdentifier(final ConfigDescriptor descriptor)
    {
        checkNotNull(descriptor);
        return new PropertyIdentifierImpl(descriptor.getConfigName(), descriptor.getMethod().getDeclaringClass());
    }
719615
@SuppressWarnings("unchecked")
    public Declaration getDeclaration(final String identifier) {
        if ( this.dirty || (this.declarations == null) ) {
            this.declarations = this.getExtendedLhs( this, null ).getOuterDeclarations();
            this.dirty = false;
        }
        return this.declarations.get( identifier );
    }
505429
public final Method getTargetMethod() {
        Method method = initialize();
        if (method == null) {
            if (LOG.isWarnEnabled()) {
                if (LOG.isWarnEnabled()) {
                    LOG.warn("Type [{}] previously declared a method [{}] which has been removed or changed. It is recommended you re-compile the class or library against the latest version to remove this warning.", declaringType, methodName);
                }
            }
            throw ReflectionUtils.newNoSuchMethodError(declaringType, methodName, argTypes);
        }
        return method;
    }