-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add withClasspath(Iterable<File>) to Compiler and JavaSourcesSubject …
…and deprecate withClasspathFrom(ClassLoader) RELNOTES=Add `withClasspath(Iterable<File>)` to `Compiler` and `JavaSourcesSubject` and deprecate `withClasspathFrom(ClassLoader)` ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=185700333
- Loading branch information
1 parent
ebbc462
commit 7622471
Showing
6 changed files
with
302 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/main/java/com/google/testing/compile/ForwardingStandardJavaFileManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Copyright (C) 2018 Google, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.testing.compile; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import javax.tools.ForwardingJavaFileManager; | ||
import javax.tools.JavaFileObject; | ||
import javax.tools.StandardJavaFileManager; | ||
|
||
/** | ||
* Forwards calls to a given {@link StandardJavaFileManager}. Subclasses of this class might | ||
* override some of these methods and might also provide additional fields and methods. | ||
*/ | ||
class ForwardingStandardJavaFileManager extends ForwardingJavaFileManager<StandardJavaFileManager> | ||
implements StandardJavaFileManager { | ||
|
||
/** | ||
* Creates a new instance of ForwardingStandardJavaFileManager. | ||
* | ||
* @param fileManager delegate to this file manager | ||
*/ | ||
ForwardingStandardJavaFileManager(StandardJavaFileManager fileManager) { | ||
super(fileManager); | ||
} | ||
|
||
@Override | ||
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles( | ||
Iterable<? extends File> files) { | ||
return fileManager.getJavaFileObjectsFromFiles(files); | ||
} | ||
|
||
@Override | ||
public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) { | ||
return fileManager.getJavaFileObjects(files); | ||
} | ||
|
||
@Override | ||
public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) { | ||
return fileManager.getJavaFileObjects(names); | ||
} | ||
|
||
@Override | ||
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) { | ||
return fileManager.getJavaFileObjectsFromStrings(names); | ||
} | ||
|
||
@Override | ||
public void setLocation(Location location, Iterable<? extends File> path) throws IOException { | ||
fileManager.setLocation(location, path); | ||
} | ||
|
||
@Override | ||
public Iterable<? extends File> getLocation(Location location) { | ||
return fileManager.getLocation(location); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.