List of utility methods to do Reflection Method Name
Method | getMethodIfAvailable(Class> clazz, String methodName, Class>... paramTypes) Determine whether the given class has a public method with the given signature, and return it if available (else return null ). if (paramTypes != null) { try { return clazz.getMethod(methodName, paramTypes); } catch (NoSuchMethodException ex) { return null; } else { Set<Method> candidates = new HashSet<Method>(1); ... |
Method | getMethodIncludingSuperClass(Class> clazz, String methodName) get Method Including Super Class for (Class<?> tmp = clazz; tmp != null && tmp != Object.class; tmp = tmp.getSuperclass()) { try { return clazz.getDeclaredMethod(methodName); } catch (NoSuchMethodException e) { return null; |
Method | getMethodInternal(Class> clazz, String methodName) Does the actual search for the method if (clazz == null) { return null; final Method method = (Method) fieldMethodCache.get(clazz.getName() + "." + methodName); if (method != null) { return method; final Method[] methods = clazz.getDeclaredMethods(); ... |
String | getMethodName() Liefert den Namen des Aufruferes zurck try { StackTraceElement trace[] = new Throwable().getStackTrace(); String lineNumber = trace[1].getLineNumber() > 0 ? "(" + trace[1].getLineNumber() + ")" : ""; return trace[1].getClassName() + "." + trace[1].getMethodName() + lineNumber; } catch (Exception e) { e.printStackTrace(); return ""; ... |
String | getMethodName() Gets the name of the method that calls this method. return doGetMethodName(false, false, (Object[]) null);
|
String | getMethodName(final int depth) get Method Name try { StackTraceElement element = (StackTraceElement) m.invoke(new Throwable(), depth + 1); return element.getMethodName(); } catch (Exception e) { e.printStackTrace(); return null; |
String | getMethodName(Method method) get Method Name boolean flag = false; char temp; char[] methods = method.toString().toCharArray(); int size = methods.length; StringBuffer sbr = new StringBuffer(size); for (int i = 0; i < size; i++) { temp = methods[i]; if (temp == '(') { ... |
String | getMethodName(Method method) get Method Name String methodName = method.getName(); if (methodName.startsWith("_")) methodName = methodName.substring(1); return methodName; |
String | getMethodName(Method method) get Method Name return method.getName();
|
String | getMethodName(Method method, boolean useSegment, String segment, String value) get Method Name String name = value != null && value.length() > 0 ? value : method.getName();
return useSegment ? segment + name : name;
|