给定其名称,返回BeanFactory类中的bean getter的名称。
//package com.nowjava;/**from N o w J a v a . c o m**/ public class Main { /** * Returns the name of the bean getter in the BeanFactory class given its * name. * * @param id * Id of the bean as defined in the context file. * * @return The name of the bean getter name in the BeanFactory class. */ public static String getBeanGetterName(String id) { if (id == null) { throw new NullPointerException("Bean id cannot be null"); } id = id.trim(); if ("".equals(id)) { throw new IllegalArgumentException("Bean id cannot be empty"); } final String id1 = id.substring(0