diff --git a/src/java.compiler/share/classes/javax/tools/JavaFileManager.java b/src/java.compiler/share/classes/javax/tools/JavaFileManager.java index a66ed5f6757..327064b5a52 100644 --- a/src/java.compiler/share/classes/javax/tools/JavaFileManager.java +++ b/src/java.compiler/share/classes/javax/tools/JavaFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2024, 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 @@ -165,7 +165,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * The result of this method is undefined if this is an output * location. * - * @implNote This implementation returns true if the name includes + * @implSpec This implementation returns true if the name includes * the word "MODULE". * * @return true if this location is expected to contain modules diff --git a/src/java.compiler/share/classes/javax/tools/SimpleJavaFileObject.java b/src/java.compiler/share/classes/javax/tools/SimpleJavaFileObject.java index 1f37797397e..a619cf34c9a 100644 --- a/src/java.compiler/share/classes/javax/tools/SimpleJavaFileObject.java +++ b/src/java.compiler/share/classes/javax/tools/SimpleJavaFileObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2024, 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 @@ -79,10 +79,10 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** + * {@inheritDoc FileObject} + * @implSpec * This implementation always throws {@linkplain - * UnsupportedOperationException}. Subclasses can change this - * behavior as long as the contract of {@link FileObject} is - * obeyed. + * UnsupportedOperationException}. */ @Override public InputStream openInputStream() throws IOException { @@ -90,10 +90,10 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** + * {@inheritDoc FileObject} + * @implSpec * This implementation always throws {@linkplain - * UnsupportedOperationException}. Subclasses can change this - * behavior as long as the contract of {@link FileObject} is - * obeyed. + * UnsupportedOperationException}. */ @Override public OutputStream openOutputStream() throws IOException { @@ -101,9 +101,10 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** - * Wraps the result of {@linkplain #getCharContent} in a Reader. - * Subclasses can change this behavior as long as the contract of - * {@link FileObject} is obeyed. + * {@inheritDoc FileObject} + * @implSpec + * This implementation wraps the result of {@link #getCharContent} + * in a {@link Reader}. * * @param ignoreEncodingErrors {@inheritDoc} * @return a Reader wrapping the result of getCharContent @@ -123,10 +124,10 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** + * {@inheritDoc FileObject} + * @implSpec * This implementation always throws {@linkplain - * UnsupportedOperationException}. Subclasses can change this - * behavior as long as the contract of {@link FileObject} is - * obeyed. + * UnsupportedOperationException}. */ @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { @@ -134,9 +135,10 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** - * Wraps the result of openOutputStream in a Writer. Subclasses - * can change this behavior as long as the contract of {@link - * FileObject} is obeyed. + * {@inheritDoc FileObject} + * @implSpec + * This implementation wraps the result of {@link + * #openOutputStream} in a {@link Writer}. * * @return a Writer wrapping the result of openOutputStream * @throws IllegalStateException {@inheritDoc} @@ -149,9 +151,9 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** - * This implementation returns {@code 0L}. Subclasses can change - * this behavior as long as the contract of {@link FileObject} is - * obeyed. + * {@inheritDoc FileObject} + * @implSpec + * This implementation returns {@code 0L}. * * @return {@code 0L} */ @@ -161,9 +163,9 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** - * This implementation does nothing. Subclasses can change this - * behavior as long as the contract of {@link FileObject} is - * obeyed. + * {@inheritDoc FileObject} + * @implSpec + * This implementation does nothing. * * @return {@code false} */ @@ -181,6 +183,8 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** + * {@inheritDoc JavaFileObject} + * @implSpec * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to @@ -190,9 +194,6 @@ public class SimpleJavaFileObject implements JavaFileObject { *
This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. - * - *
Subclasses can change this behavior as long as the contract - * of {@link JavaFileObject} is obeyed. */ @Override public boolean isNameCompatible(String simpleName, Kind kind) { @@ -203,17 +204,17 @@ public class SimpleJavaFileObject implements JavaFileObject { } /** - * This implementation returns {@code null}. Subclasses can - * change this behavior as long as the contract of - * {@link JavaFileObject} is obeyed. + * {@inheritDoc JavaFileObject} + * @implSpec + * This implementation returns {@code null}. */ @Override public NestingKind getNestingKind() { return null; } /** - * This implementation returns {@code null}. Subclasses can - * change this behavior as long as the contract of - * {@link JavaFileObject} is obeyed. + * {@inheritDoc JavaFileObject} + * @implSpec + * This implementation returns {@code null}. */ @Override public Modifier getAccessLevel() { return null; }