Is there a way to get Eclipse to realize that @Nonnull fields have been initialized in some initialization method. I'm looking for something like @EnsuresNonNull({"bar"}) in the otherwise completely unusable Checker Framework.
Example:
import javax.annotation.Nonnull;
public class Foo{
@Nonnull String foo;
public Foo(){
init();
}
//need something like @EnsuresNonNull({"foo"});
public void init(){
foo="foo";
}
}
Getting the following error:
The @Nonnull field foo may not have been initialized