如果字段非私有且没有注释,请在Checkstyle中发出警告

时间:2013-10-24 13:32:56

标签: java eclipse checkstyle android-annotations

如果字段是非私有且没有注释之一,有没有办法用Checkstyle发出警告?

即:

public class Foo {
   private String mBoo; // this is OK
   public String mBad; // it should be warning
   [@Bean][1]
   String mBean; // it is OK
   @Bean
   public String mBean; // it should be warning (because it is public)
}

@Edit

有多个注释,例如@Bean annotations

0 个答案:

没有答案