Package org.hivedb.util.classgen.ReflectionTools

Examples of org.hivedb.util.classgen.ReflectionTools.SetterWrapper.invoke()


  }
  @Test
  public void testGetCorrespondingSetterWrapper() {
    Foo foo = new GenerateInstance<Foo>(Foo.class).generate();
    SetterWrapper setterWrapper = ReflectionTools.getCorrespondingSetterWrapper(foo, "getStroo", String.class);
    setterWrapper.invoke(foo, "x");
    Assert.assertEquals(foo.getStroo(), "x");
   
    setterWrapper = ReflectionTools.getCorrespondingSetterWrapper(ReflectionTools.getGetterOfProperty(Foo.class, "stroo"));
    setterWrapper.invoke(foo, "y");
    Assert.assertEquals(foo.getStroo(), "y");
View Full Code Here


    SetterWrapper setterWrapper = ReflectionTools.getCorrespondingSetterWrapper(foo, "getStroo", String.class);
    setterWrapper.invoke(foo, "x");
    Assert.assertEquals(foo.getStroo(), "x");
   
    setterWrapper = ReflectionTools.getCorrespondingSetterWrapper(ReflectionTools.getGetterOfProperty(Foo.class, "stroo"));
    setterWrapper.invoke(foo, "y");
    Assert.assertEquals(foo.getStroo(), "y");
  }
  @Test
  public void testGetCorrespondingGetter() {
    Foo foo = new GenerateInstance<Foo>(Foo.class).generate();
View Full Code Here

 
  @Test
  public void testGetSetterWrapperOfProperty() {
    Foo foo = new GenerateInstance<Foo>(Foo.class).generate();
    SetterWrapper setterWrapper = ReflectionTools.getSetterWrapperOfProperty(Foo.class, "stroo");
    setterWrapper.invoke(foo, "x");
    Assert.assertEquals(foo.getStroo(), "x");
  }
 
  @Test
  public void testGetSetterOfProperty() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.