public object getBean(String name){ String className=props.getProperty(name); object bean=null; try{ Class clazz=Class.ForName(className); bean=clazz.newInstance(); } catch(Exception e){ e.printStackTrace(); } if(bean instanceof ProxyBean){ Object proxy=null; ProxyFactoryBean proxyFactoryBean=(ProxyFactoryBean)bean; try{ Advice advice=(Advice)Class.ForName(props.getProperty(name+”.advice”)).newInstence(); Object target=Class.ForName(props.getProperty(name+”.target”)).newInstence(); proxyFactoryBean.setAdvice(advice); proxyFactoryBean.setTarget(target); proxy.proxyFactoryBean.getProxy(); }catch(Exception e){ e.printStackTrace(); } } } 哪位大神可以解释一下红色区域代码的含义
|