/** * Parses a list of modifiers. * * @param modifiersList The string representation of a list of modifiers. The representation may * or may not include the surrounding braces (braces will be ignored). * @return A list of modifiers */ public static Modifiers parseModifiers(String modifiersList) { Modifiers modifiers = new Modifiers(); for (String s : modifiersList.split(",")) { String nameValuePair = s.trim(); String[] split = nameValuePair.split("="); if (split.length == 2) { modifiers.addModifier(split[0], split[1]); } } return modifiers; }
/** * Parses a list of modifiers. * * @param modifiersList The string representation of a list of modifiers. The representation may * or may not include the surrounding braces (braces will be ignored). * @return A list of modifiers */ public static Modifiers parseModifiers(String modifiersList) { Modifiers modifiers = new Modifiers(); for (String s : modifiersList.split(",")) { String nameValuePair = s.trim(); String[] split = nameValuePair.split("="); if (split.length == 2) { modifiers.addModifier(split[0], split[1]); } } return modifiers; }
/** * Parses a list of modifiers. * * @param modifiersList The string representation of a list of modifiers. The representation may * or may not include the surrounding braces (braces will be ignored). * @return A list of modifiers */ public static Modifiers parseModifiers(String modifiersList) { Modifiers modifiers = new Modifiers(); for (String s : modifiersList.split(",")) { String nameValuePair = s.trim(); String[] split = nameValuePair.split("="); if (split.length == 2) { modifiers.addModifier(split[0], split[1]); } } return modifiers; }