private static void check(int mods, int legal, String what) { if ((mods & ~legal) != 0) { throw new IllegalArgumentException("Illegal modifiers for " + what + ": " + new JMods(mods).toString()); } /* ## check for illegal combinations too */ }
private static void check(int mods, int legal, String what) { if ((mods & ~legal) != 0) throw new IllegalArgumentException("Illegal modifiers for " + what + ": " + new JMods(mods).toString()); /* ## check for illegal combinations too */ }
private static void check(int mods, int legal, String what) { if ((mods & ~legal) != 0) { throw new IllegalArgumentException("Illegal modifiers for " + what + ": " + new JMods(mods).toString()); } /* ## check for illegal combinations too */ }
private static void check(int mods, int legal, String what) { if ((mods & ~legal) != 0) { throw new IllegalArgumentException("Illegal modifiers for " + what + ": " + new JMods(mods).toString()); } /* ## check for illegal combinations too */ }
private static void check(int mods, int legal, String what) { if ((mods & ~legal) != 0) { throw new IllegalArgumentException("Illegal modifiers for " + what + ": " + new JMods(mods).toString()); } /* ## check for illegal combinations too */ }
static JMods forInterface(int mods) { check(mods, INTERFACE, "class"); return new JMods(mods); }
static JMods forVar(int mods) { check(mods, VAR, "variable"); return new JMods(mods); }
static JMods forField(int mods) { check(mods, FIELD, "field"); return new JMods(mods); }
static JMods forInterface(int mods) { check(mods, INTERFACE, "class"); return new JMods(mods); }
static JMods forMethod(int mods) { check(mods, METHOD, "method"); return new JMods(mods); }
static JMods forInterface(int mods) { check(mods, INTERFACE, "class"); return new JMods(mods); }
static JMods forField(int mods) { check(mods, FIELD, "field"); return new JMods(mods); }
static JMods forClass(int mods) { check(mods, CLASS, "class"); return new JMods(mods); }
static JMods forMethod(int mods) { check(mods, METHOD, "method"); return new JMods(mods); }
static JMods forClass(int mods) { check(mods, CLASS, "class"); return new JMods(mods); }
static JMods forField(int mods) { check(mods, FIELD, "field"); return new JMods(mods); }
static JMods forClass(int mods) { check(mods, CLASS, "class"); return new JMods(mods); }
static JMods forInterface(int mods) { check(mods, INTERFACE, "class"); return new JMods(mods); }
static JMods forVar(int mods) { check(mods, VAR, "variable"); return new JMods(mods); }
static JMods forMethod(int mods) { check(mods, METHOD, "method"); return new JMods(mods); }