code: public static int setNative(int modifier, boolean b) {
          if (b) {
              return (modifier | NATIVE) & 
                  (~VOLATILE & ~TRANSIENT & ~INTERFACE & ~ABSTRACT & ~STRICT);
          }
          else {
              return modifier & ~NATIVE;
          }
      }
docs: When set native, non-native-method settings are cleared.