コード例 #1
0
ファイル: JsonFactory.java プロジェクト: sabob/ratel
 /** Method that calculates bit set (flags) of all features that are enabled by default. */
 public static int collectDefaults() {
   int flags = 0;
   for (Feature f : values()) {
     if (f.enabledByDefault()) {
       flags |= f.getMask();
     }
   }
   return flags;
 }
コード例 #2
0
ファイル: JsonGenerator.java プロジェクト: vovs/GMusic
 public static int collectDefaults()
 {
   int i = 0;
   Feature[] arrayOfFeature = values();
   int j = arrayOfFeature.length;
   int k = 0;
   while (k < j)
   {
     Feature localFeature = arrayOfFeature[k];
     if (localFeature.enabledByDefault())
     {
       int m = localFeature.getMask();
       i |= m;
     }
     k += 1;
   }
   return i;
 }