public static byte buildFlags(boolean isStatic, boolean isOnDemand) {
    return (byte)((isStatic ? 1 : 0) * STATIC_MASK +
                  (isOnDemand ? 1 : 0) * ON_DEMAND_MASK);
  }
public static byte buildFlags(boolean isStatic, boolean isOnDemand)