- Common ways to obtain MethodIdentifier
private void myMethod () {MethodIdentifier m =
Method method;MethodIdentifier.getIdentifierForMethod(method)
String name;MethodIdentifier.getIdentifier(void.class, name)
InterceptorClassDescription interceptorClassDescription;interceptorClassDescription.getAroundTimeout()
- Smart code suggestions by Codota
}
/** * 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 */ 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()); }
/** * 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 */ 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()); }
/** * 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 */ 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()); }
/** * 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 */ 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()); }