@Override public String toString() { return this.method.toString(); }
@Override public String toString() { return method.toString(); } }
@Override protected String getReplacementFor(String placeholder) { return method.toString(); } }
@Override public String describe() { return shadowMethod.toString(); } }
@Override public String toString() { return method.toString(); }
@Override public int compareTo(MethodClassKey other) { int result = this.method.getName().compareTo(other.method.getName()); if (result == 0) { result = this.method.toString().compareTo(other.method.toString()); if (result == 0 && this.targetClass != null && other.targetClass != null) { result = this.targetClass.getName().compareTo(other.targetClass.getName()); } } return result; }
PropertyType(Method getter) { this(getter.getReturnType(),getter.getGenericReturnType(),getter.toString()); }
/** * */ public static void printFileItemMethod(Set<Method> disconfFileItemSet) { for (Method item : disconfFileItemSet) { LOGGER.info(item.toString()); } }
private List<Method> findCandidateWriteMethods(MethodDescriptor[] methodDescriptors) { List<Method> matches = new ArrayList<>(); for (MethodDescriptor methodDescriptor : methodDescriptors) { Method method = methodDescriptor.getMethod(); if (isCandidateWriteMethod(method)) { matches.add(method); } } // Sort non-void returning write methods to guard against the ill effects of // non-deterministic sorting of methods returned from Class#getDeclaredMethods // under JDK 7. See http://bugs.sun.com/view_bug.do?bug_id=7023180 matches.sort((m1, m2) -> m2.toString().compareTo(m1.toString())); return matches; }
@Override public int compareTo(MethodClassKey other) { int result = this.method.getName().compareTo(other.method.getName()); if (result == 0) { result = this.method.toString().compareTo(other.method.toString()); if (result == 0 && this.targetClass != null && other.targetClass != null) { result = this.targetClass.getName().compareTo(other.targetClass.getName()); } } return result; }
@Override public String toString() { if (m_method != null) return m_method.toString(); else return m_constructor.toString(); } }
@Override public String toString() { return method.toString(); } }
/** * Obtains the display name of the given initialization task */ protected String getDisplayNameOf(Method e, T i) { Class<?> c = e.getDeclaringClass(); String key = displayNameOf(i); if (key.length()==0) return c.getSimpleName()+"."+e.getName(); try { ResourceBundleHolder rb = ResourceBundleHolder.get( c.getClassLoader().loadClass(c.getPackage().getName() + ".Messages")); return rb.format(key); } catch (ClassNotFoundException x) { LOGGER.log(WARNING, "Failed to load "+x.getMessage()+" for "+e.toString(),x); return key; } catch (MissingResourceException x) { LOGGER.log(WARNING, "Could not find key '" + key + "' in " + c.getPackage().getName() + ".Messages", x); return key; } }
Method method = testContext.getTestMethod(); String elementType = (classLevel ? "class" : "method"); String elementName = (classLevel ? clazz.getName() : method.toString());
private static <T> RestfulClientInvoker createClientInvoker(Class<T> clazz, Method method, ResteasyWebTarget base, ProxyConfig config) { Set<String> httpMethods = IsHttpMethod.getHttpMethods(method); if (httpMethods == null || httpMethods.size() != 1) { throw new RuntimeException( "You must use at least one, but no more than one http method annotation on: " + method.toString()); } RestfulClientInvoker invoker = new RestfulClientInvoker(base, clazz, method, config); invoker.setHttpMethod(httpMethods.iterator().next()); return invoker; }
@Test public void noCacheResolved() { Method method = ReflectionUtils.findMethod(SimpleService.class, "noCacheResolved", Object.class); try { this.simpleService.noCacheResolved(new Object()); fail("Should have failed, no cache resolved"); } catch (IllegalStateException ex) { assertTrue("Reference to the method must be contained in the message", ex.getMessage().contains(method.toString())); } }