返回bean中属性设置器的名称。
//package com.nowjava; /** 来自 时 代 J a v a - N o w J a v a . c o m**/ public class Main { /** * Returns the name of the property setter in the bean. * * @param name * Name of the property. * * @return The name of the property setter. */ public static String getPropertySetterName(String name) { if (name == null) { throw new NullPointerException("Property name cannot be null"); } name = name.trim(); if ("".equals(name)) { throw new IllegalArgumentException( "Property name cannot be empty"); }