Package jodd.introspector

Examples of jodd.introspector.CachingIntrospector


    String foo = BeanUtil.getProperty(lifeBean, "foo").toString();

    assertEquals("foo", foo);

    JoddIntrospector.introspector = new CachingIntrospector(true, true, true, new String[] {"_"});

    foo = BeanUtil.getProperty(lifeBean, "foo").toString();

    assertEquals("foo", foo);

    ClassDescriptor cd = JoddIntrospector.introspector.lookup(LifeBean.class);

    PropertyDescriptor[] pds = cd.getAllPropertyDescriptors();
    assertEquals(3, pds.length);

    assertEquals("bar", pds[0].getName());
    assertEquals("_bar", pds[0].getFieldDescriptor().getName());

    assertEquals("www", pds[2].getName());
    assertEquals(null, pds[2].getFieldDescriptor());

    JoddIntrospector.introspector = new CachingIntrospector();
  }
View Full Code Here


    String foo = BeanUtil.getProperty(lifeBean, "foo").toString();

    assertEquals("foo", foo);

    JoddIntrospector.introspector = new CachingIntrospector(true, true, true, new String[] {"_", ""});

    foo = BeanUtil.getProperty(lifeBean, "foo").toString();

    assertEquals("foo", foo);


    ClassDescriptor cd = JoddIntrospector.introspector.lookup(LifeBean.class);

    PropertyDescriptor[] pds = cd.getAllPropertyDescriptors();
    assertEquals(3, pds.length);

    assertEquals("bar", pds[0].getName());
    assertEquals("_bar", pds[0].getFieldDescriptor().getName());

    assertEquals("www", pds[2].getName());
    assertEquals("www", pds[2].getFieldDescriptor().getName());

    JoddIntrospector.introspector = new CachingIntrospector();
  }
View Full Code Here

    String bar = BeanUtil.getProperty(lifeBean, "bar").toString();

    assertEquals("bar", bar);

    BeanUtil.getBeanUtilBean().setIntrospector(new CachingIntrospector(true, true, true, new String[] {"_"}));

    bar = BeanUtil.getProperty(lifeBean, "bar").toString();

    assertEquals("_bar", bar);
View Full Code Here

TOP

Related Classes of jodd.introspector.CachingIntrospector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.