0

I have the following Interface :

public interface beanExample {
   public BigDecimal norm(BigDecimal dec);
}

and then i create a Category for it:

public class beanExampleCategory {

   public static BigDecimal norm(BigDecimal dec) {
    return dec != null ? dec : BigDecimal.ZERO;
   }
}

and my Factory looks like :

@Category(beanExampleCategory.class)
public interface myFactory extends AutoBeanFactory { 
   AutoBean<beanExample> mybean();
}

But when i compile i got those errors:

[ERROR] The beanExample parameterization is not simple 
 and the following methods did not have static implementations:
[ERROR] public abstract java.math.BigDecimal norm(java.math.BigDecimal dec)
[ERROR] Unable to complete due to previous errors

I try to resolve into several ways but i cant figure out how to solve it!

How can i implement a method with params with AutoBean?

3logy
  • 2,634
  • 8
  • 46
  • 99

1 Answers1

0

Your category method has to take an AutoBean<beanExample> as its first argument.

See https://code.google.com/p/google-web-toolkit/wiki/AutoBean#Categories

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164