@Test public void testParseInvalidActionString() { try { PermissionActions.parseActionStringToSet(ActionSetOne.class, "xxx"); } catch (IllegalArgumentException ignored) {} try { PermissionActions.parseActionStringToSet(ActionSetOne.class, "barf,foo"); } catch (IllegalArgumentException ignored) {} try { PermissionActions.parseActionStringToSet(ActionSetOne.class, ",barf,foo,foo,"); } catch (IllegalArgumentException ignored) {} try { PermissionActions.parseActionStringToSet(ActionSetOne.class, "*,barf,foo"); } catch (IllegalArgumentException ignored) {} try { PermissionActions.parseActionStringToSet(ActionSetOne.class, "*,bar f,foo"); } catch (IllegalArgumentException ignored) {} try { PermissionActions.parseActionStringToSet(ActionSetOne.class, "*,bar foo,foo"); } catch (IllegalArgumentException ignored) {} try { PermissionActions.parseActionStringToSet(ActionSetOne.class, "FOO,BAR"); } catch (IllegalArgumentException ignored) {} }
public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); }
PermissionActions { public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); } }
PermissionActions { public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); } private  PermissionActions(); }
PermissionActions { public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); } private  PermissionActions(); static EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString); static int parseActionStringToInt(Class<E> actionType, String actionString); static long parseActionStringToLong(Class<E> actionType, String actionString); static String getCanonicalActionString(EnumSet<E> set); static void getCanonicalActionString(EnumSet<E> set, StringBuilder b); static String getCanonicalActionString(Class<E> type, int set); static void getCanonicalActionString(Class<E> type, int set, StringBuilder b); static String getCanonicalActionString(Class<E> type, long set); static void getCanonicalActionString(Class<E> type, long set, StringBuilder b); }
PermissionActions { public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); } private  PermissionActions(); static EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString); static int parseActionStringToInt(Class<E> actionType, String actionString); static long parseActionStringToLong(Class<E> actionType, String actionString); static String getCanonicalActionString(EnumSet<E> set); static void getCanonicalActionString(EnumSet<E> set, StringBuilder b); static String getCanonicalActionString(Class<E> type, int set); static void getCanonicalActionString(Class<E> type, int set, StringBuilder b); static String getCanonicalActionString(Class<E> type, long set); static void getCanonicalActionString(Class<E> type, long set, StringBuilder b);  }