langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/PathFileObject.java
changeset 31753 72417309a675
parent 29780 8f8e54a1fa20
child 34560 b6a567b677f7
equal deleted inserted replaced
31216:43d0179ee9de 31753:72417309a675
     1 /*
     1 /*
     2  * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   102     public static PathFileObject createJRTPathFileObject(BaseFileManager fileManager,
   102     public static PathFileObject createJRTPathFileObject(BaseFileManager fileManager,
   103             final Path path) {
   103             final Path path) {
   104         return new PathFileObject(fileManager, path) {
   104         return new PathFileObject(fileManager, path) {
   105             @Override
   105             @Override
   106             public String inferBinaryName(Iterable<? extends Path> paths) {
   106             public String inferBinaryName(Iterable<? extends Path> paths) {
   107                 // use subpath to ignore the leading component containing the module name
   107                 // use subpath to ignore the leading /modules/MODULE-NAME
   108                 return toBinaryName(path.subpath(1, path.getNameCount()));
   108                 return toBinaryName(path.subpath(2, path.getNameCount()));
   109             }
   109             }
   110         };
   110         };
   111     }
   111     }
   112 
   112 
   113     /**
   113     /**