Java Reflection Method Setter Get getSetterName(Method m)

Here you can find the source of getSetterName(Method m)

Description

get Setter Name

License

Open Source License

Declaration

private static String getSetterName(Method m) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.lang.reflect.*;

public class Main {
    private static String getSetterName(Method m) {
        String name = m.getName();

        if (name.substring(0, 3).equals("set"))
            name = name.substring(3);//from ww w .  java2 s . c om

        return name;
    }
}

Related

  1. getSetterMethods(Class objectType)
  2. getSetterMethods(Class pojoClass)
  3. getSetterMethods(final Class clazz)
  4. getSetterName(Field field)
  5. getSetterName(final Field field)
  6. getSetterName(Method m)
  7. getSetterName(Method method)
  8. getSetterName(String name)
  9. getSetterOrGetter(Class clazz, String name, boolean isSetter)