Java examples for Reflection:Method Name
remove Bean Method Prefix
//package com.java2s; public class Main { public static String removeBeanMethodPrefix(String methodName) { if (methodName.startsWith("get")) { //NOI18N methodName = methodName.replaceFirst("get", ""); }//from w ww.j a v a 2s . co m if (methodName.startsWith("set")) { //NOI18N methodName = methodName.replaceFirst("set", ""); } if (methodName.startsWith("is")) { //NOI18N methodName = methodName.replaceFirst("is", ""); } return methodName; } }