@Override public boolean accepts(Class<?> item, String path, Scope scope) throws IOException { return CLASSPATH.equals(scope); }
@Override public String getName() { return name(); }
@Override public boolean accepts(DirectoryResource item, String path, Scope scope) throws IOException { return (CLASSPATH.equals(scope) && path != null && !path.startsWith("/META-INF")); }
@Override public boolean accepts(FileResource item, String path, Scope scope) throws IOException { return CLASSPATH.equals(scope) && "/META-INF/MANIFEST.MF".equals(path); }
@Override public boolean accepts(FileResource item, String path, Scope scope) throws IOException { return JavaScope.CLASSPATH.equals(scope) && "/META-INF/persistence.xml".equals(path) || "/WEB-INF/persistence.xml".equals(path); }
@Override public boolean accepts(FileResource item, String path, Scope scope) throws IOException { return CLASSPATH.equals(scope) && PATTERN.matcher(path).matches(); }
@Override public boolean accepts(FileResource item, String path, Scope scope) throws IOException { return JavaScope.CLASSPATH.equals(scope) && ("/META-INF/beans.xml".equals(path) || "/WEB-INF/beans.xml".equals(path)); }
@Override public boolean accepts(FileResource file, String path, Scope scope) throws IOException { if (CLASSPATH.equals(scope) && path.endsWith(".class")) { try (InputStream stream = file.createStream()) { byte[] header = new byte[CAFEBABE.length]; int read = stream.read(header); return read == CAFEBABE.length && Arrays.equals(CAFEBABE, header); } } return false; }