/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ import java.io.IOException; import java.net.URI; import java.nio.file.*; import java.nio.file.attribute.UserPrincipalLookupService; import java.nio.file.spi.FileSystemProvider; import java.util.Set; public class DummyPath implements Path { FileSystem fs = new DummyFileSystem(); class DummyFileSystem extends FileSystem { @Override public FileSystemProvider provider() { return null; } @Override public void close() throws IOException { } @Override public boolean isOpen() { return false; } @Override public boolean isReadOnly() { return false; } @Override public String getSeparator() { return null; } @Override public Iterable getRootDirectories() { return null; } @Override public Iterable getFileStores() { return null; } @Override public Set supportedFileAttributeViews() { return null; } @Override public Path getPath(String first, String... more) { return null; } @Override public PathMatcher getPathMatcher(String syntaxAndPattern) { return null; } @Override public UserPrincipalLookupService getUserPrincipalLookupService() { return null; } @Override public WatchService newWatchService() throws IOException { return null; } } @Override public FileSystem getFileSystem() { return fs; } @Override public boolean isAbsolute() { return false; } @Override public Path getRoot() { return null; } @Override public Path getFileName() { return null; } @Override public Path getParent() { return null; } @Override public int getNameCount() { return 0; } @Override public Path getName(int index) { return null; } @Override public Path subpath(int beginIndex, int endIndex) { return null; } @Override public boolean startsWith(Path other) { return false; } @Override public boolean endsWith(Path other) { return false; } @Override public Path normalize() { return null; } @Override public Path resolve(Path other) { return null; } @Override public Path relativize(Path other) { return null; } @Override public URI toUri() { return null; } @Override public Path toAbsolutePath() { return null; } @Override public Path toRealPath(LinkOption... options) throws IOException { return null; } @Override public WatchKey register(WatchService watcher, WatchEvent.Kind[] events, WatchEvent.Modifier... modifiers) throws IOException { return null; } @Override public int compareTo(Path other) { return 0; } }