langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SmartFileObject.java
changeset 26266 2d24bda701dc
parent 26107 a4a156a33c94
child 27225 8369cde9152a
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SmartFileObject.java	Tue Aug 26 12:45:28 2014 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SmartFileObject.java	Wed Aug 27 07:44:00 2014 +0200
@@ -31,6 +31,9 @@
 import javax.lang.model.element.NestingKind;
 import javax.tools.JavaFileObject;
 
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+
 /**
  * The SmartFileObject will return an outputstream that cache the written data
  * and compare the new content with the old content on disk. Only if they differ,
@@ -61,36 +64,44 @@
         return file.hashCode();
     }
 
+    @DefinedBy(Api.COMPILER)
     public Kind getKind() {
         return file.getKind();
     }
 
+    @DefinedBy(Api.COMPILER)
     public boolean isNameCompatible(String simpleName, Kind kind) {
         return file.isNameCompatible(simpleName, kind);
     }
 
+    @DefinedBy(Api.COMPILER)
     public URI toUri() {
         return file.toUri();
     }
 
+    @DefinedBy(Api.COMPILER)
     public String getName() {
         return file.getName();
     }
 
+    @DefinedBy(Api.COMPILER)
     public InputStream openInputStream() throws IOException {
         return file.openInputStream();
     }
 
+    @DefinedBy(Api.COMPILER)
     public OutputStream openOutputStream() throws IOException {
         return file.openOutputStream();
     }
 
+    @DefinedBy(Api.COMPILER)
     public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
         return file.getCharContent(ignoreEncodingErrors);
     }
 
     static String lineseparator = System.getProperty("line.separator");
 
+    @DefinedBy(Api.COMPILER)
     public Writer openWriter() throws IOException {
         StringBuilder s = new StringBuilder();
         try (BufferedReader r = new BufferedReader(file.openReader(true))) {
@@ -103,22 +114,27 @@
         return new SmartWriter(file, s.toString(), file.getName(), stdout);
     }
 
+    @DefinedBy(Api.COMPILER)
     public long getLastModified() {
         return file.getLastModified();
     }
 
+    @DefinedBy(Api.COMPILER)
     public boolean delete() {
         return file.delete();
     }
 
+    @DefinedBy(Api.COMPILER)
     public Modifier getAccessLevel() {
         return file.getAccessLevel();
     }
 
+    @DefinedBy(Api.COMPILER)
     public NestingKind getNestingKind() {
         return file.getNestingKind();
     }
 
+    @DefinedBy(Api.COMPILER)
     public Reader openReader(boolean ignoreEncodingErrors) throws IOException {
         return file.openReader(ignoreEncodingErrors);
     }