/** * Returns whether the specified scope name(s) are valid given the current scope. * * @param scopeNames The list of scope names * @return true if they are valid */ public static boolean isValid(String... scopeNames) { BuildScope currentScope = getCurrent(); if (currentScope.equals(ALL)) return true; for (String scopeName : scopeNames) { BuildScope specifiedScope = BuildScope.valueOf(scopeName.toUpperCase()); if (currentScope == specifiedScope) return true; } return false; }