Here you can find the source of getMethodName(Method method)
protected static String getMethodName(Method method)
//package com.java2s; /******************************************************************************* * Copyright (c) 2008 The University of York. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * //from w w w. j a v a2 s.com * Contributors: * Dimitrios Kolovos - initial API and implementation ******************************************************************************/ import java.lang.reflect.Method; public class Main { protected static String getMethodName(Method method) { String methodName = method.getName(); if (methodName.startsWith("_")) methodName = methodName.substring(1); return methodName; } }