cglib的fastmethod

简单示例:

    FastClass serviceFastClass = FastClass.create(Person.class);

    Person p = new Person();

    p.setName("Tom");

    FastMethod serviceFastMethod = serviceFastClass.getMethod("display", new Class[]{String.class});

    Object returnValue = serviceFastMethod.invoke(p, new Object[]{"qazxsw"});

    System.out.println(returnValue);

java自带的反射调用

还有个:http://www.iteye.com/topic/1129340#

posted on 2017-02-22 16:04  反光的小鱼儿  阅读(365)  评论(0编辑  收藏  举报