// Path: src/main/java/be/fror/common/base/Preconditions.java
// public static <T> T checkArgument(@Nullable T value, Predicate<? super T> predicate) {
//   if (predicate.test(value)) {
//     return value;
//   } else {
//     throw new IllegalArgumentException();
//   }
// }
// 
// Path: src/main/java/be/fror/common/base/Preconditions.java
// public static <T> T checkNotNull(@Nullable T reference) {
//   if (reference != null) {
//     return reference;
//   } else {
//     throw new NullPointerException();
//   }
// }
// 
// Path: src/main/java/be/fror/common/base/Preconditions.java
// public static void checkState(boolean expression) {
//   if (!expression) {
//     throw new IllegalStateException();
//   }
// }
// 
// Path: src/main/java/be/fror/common/base/Throwables.java
// public static RuntimeException propagate(Throwable throwable) {
//   propagateIfPossible(checkNotNull(throwable));
//   throw new RuntimeException(throwable);
// }
// 
// Path: src/main/java/be/fror/common/io/Resources.java
// public static ByteSource asByteSource(URL url) {
//   return new UrlByteSource(checkNotNull(url));
// }
// 
// Path: src/main/java/be/fror/common/io/Resources.java
// public static CharSource asCharSource(URL url, Charset charset) {
//   return asByteSource(url)
//       .asCharSource(charset);
// }


import static be.fror.common.base.Preconditions.checkArgument;
import static be.fror.common.base.Preconditions.checkNotNull;
import static be.fror.common.base.Preconditions.checkState;
import static be.fror.common.base.Throwables.propagate;
import static be.fror.common.io.Resources.asByteSource;
import static be.fror.common.io.Resources.asCharSource;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.nio.file.Files.isDirectory;
import static java.util.Arrays.asList;
import static java.util.Arrays.stream;
import static java.util.stream.Collectors.toList;
import com.google.common.base.CharMatcher;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.reflect.ClassPath;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.FileSystem;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.function.Predicate;
import java.util.jar.JarFile;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.concurrent.ThreadSafe;
      }
      return new ResourceLocator(builder.build());
    }

    private static boolean isResourceInfoUrlCorrect(ClassPath.ResourceInfo ri) {
      try {
        ri.url();
        return true;
      } catch (NullPointerException | NoSuchElementException e) {
        return false;
      }
    }
  }

  private static final CharMatcher REGEX_META = CharMatcher.anyOf(".^$+{[]|()");
  private static final CharMatcher GLOB_META = CharMatcher.anyOf("\\*?{");

  static String globToRegex(final String glob) {

    CharIterator chars = new CharIterator(glob);
    boolean inGroup = false;
    StringBuilder regex = new StringBuilder("^");

    while (chars.hasNext()) {
      char c = chars.next();
      switch (c) {
        case '\\':
          if (!chars.hasNext()) {
            throw new PatternSyntaxException("No character to escape", glob, chars.index - 1);
          }
// Path: src/main/java/be/fror/common/base/Preconditions.java
// public static <T> T checkArgument(@Nullable T value, Predicate<? super T> predicate) {
//   if (predicate.test(value)) {
//     return value;
//   } else {
//     throw new IllegalArgumentException();
//   }
// }
// 
// Path: src/main/java/be/fror/common/base/Preconditions.java
// public static <T> T checkNotNull(@Nullable T reference) {
//   if (reference != null) {
//     return reference;
//   } else {
//     throw new NullPointerException();
//   }
// }
// 
// Path: src/main/java/be/fror/common/base/Preconditions.java
// public static void checkState(boolean expression) {
//   if (!expression) {
//     throw new IllegalStateException();
//   }
// }
// 
// Path: src/main/java/be/fror/common/base/Throwables.java
// public static RuntimeException propagate(Throwable throwable) {
//   propagateIfPossible(checkNotNull(throwable));
//   throw new RuntimeException(throwable);
// }
// 
// Path: src/main/java/be/fror/common/io/Resources.java
// public static ByteSource asByteSource(URL url) {
//   return new UrlByteSource(checkNotNull(url));
// }
// 
// Path: src/main/java/be/fror/common/io/Resources.java
// public static CharSource asCharSource(URL url, Charset charset) {
//   return asByteSource(url)
//       .asCharSource(charset);
// }


// Path: src/main/java/be/fror/common/resource/ResourceLocator.java
import static be.fror.common.base.Preconditions.checkArgument;
import static be.fror.common.base.Preconditions.checkNotNull;
import static be.fror.common.base.Preconditions.checkState;
import static be.fror.common.base.Throwables.propagate;
import static be.fror.common.io.Resources.asByteSource;
import static be.fror.common.io.Resources.asCharSource;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.nio.file.Files.isDirectory;
import static java.util.Arrays.asList;
import static java.util.Arrays.stream;
import static java.util.stream.Collectors.toList;
import com.google.common.base.CharMatcher;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.reflect.ClassPath;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.FileSystem;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.function.Predicate;
import java.util.jar.JarFile;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.concurrent.ThreadSafe;

      }
      return new ResourceLocator(builder.build());
    }

    private static boolean isResourceInfoUrlCorrect(ClassPath.ResourceInfo ri) {
      try {
        ri.url();
        return true;
      } catch (NullPointerException | NoSuchElementException e) {
        return false;
      }
    }
  }

  private static final CharMatcher REGEX_META = CharMatcher.anyOf(".^$+{[]|()");
  private static final CharMatcher GLOB_META = CharMatcher.anyOf("\\*?{");

  static String globToRegex(final String glob) {

    CharIterator chars = new CharIterator(glob);
    boolean inGroup = false;
    StringBuilder regex = new StringBuilder("^");

    while (chars.hasNext()) {
      char c = chars.next();
      switch (c) {
        case '\\':
          if (!chars.hasNext()) {
            throw new PatternSyntaxException("No character to escape", glob, chars.index - 1);
          }
          char next = chars.next();