1 package com.fasterxml.jackson.core.util; 2 3 /** 4 * Basic API implemented by Enums used for simple Jackson "features": on/off 5 * settings and capabilities exposed as something that can be internally 6 * represented as bit sets. 7 * Designed to be used with {@link JacksonFeatureSet}. 8 * 9 * @since 2.12 10 */ 11 public interface JacksonFeature 12 { 13 /** 14 * Accessor for checking whether this feature is enabled by default. 15 */ enabledByDefault()16 public boolean enabledByDefault(); 17 18 /** 19 * Returns bit mask for this feature instance; must be a single bit, 20 * that is of form {@code 1 << N} 21 */ getMask()22 public int getMask(); 23 24 /** 25 * Convenience method for checking whether feature is enabled in given bitmask 26 */ enabledIn(int flags)27 public boolean enabledIn(int flags); 28 } 29