code: public static boolean hasRoles(List<String> roleNames) throws Throwable
      {
          DEADBOLT_HANDLER.beforeRoleCheck();
  
          RoleHolder roleHolder = getRoleHolder();
  
          return roleHolder != null &&
                 roleHolder.getRoles() != null &&
                 hasAllRoles(roleHolder,
                             roleNames.toArray(new String[roleNames.size()]));
      }
docs: Checks if the current user has the specified role.
  
  @param roleNames the names of the required roles
  @return true iff the current user has the specified role