Package org.jboss.forge.roaster.model.source

Examples of org.jboss.forge.roaster.model.source.JavaClassSource.addProperty()


   @Test
   public void testChangePropertyType()
   {
      JavaClassSource source = Roaster.create(JavaClassSource.class).setName("MyClass");
      PropertySource<JavaClassSource> property = source.addProperty(Date.class, "myDate");
      property.setType(Timestamp.class);
      Assert.assertEquals("Timestamp", source.getField("myDate").getType().getName());
      Assert.assertEquals("Timestamp", source.getMethod("getMyDate").getReturnType().getName());
      Assert.assertNotNull(source.getMethod("setMyDate", Timestamp.class));
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.