diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2012-11-26 02:52:39 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2012-11-26 02:52:39 +0000 |
commit | 8361c24c3fc1d6a5189cffdc2cd6c1c6aa75c962 (patch) | |
tree | 402354d9815f7d10ee5cc1e8de997287caafc68e | |
parent | ee33a9b464499659a674b26243e57fa9a349ab47 (diff) | |
download | classpath-8361c24c3fc1d6a5189cffdc2cd6c1c6aa75c962.tar.gz |
Documentation & annotation update/cleanup on new files.
2012-11-25 Andrew John Hughes <gnu_andrew@member.fsf.org>
* javax/annotation/processing/Filer.java,
* javax/annotation/processing/Messager.java,
* javax/annotation/processing/ProcessingEnvironment.java,
* javax/annotation/processing/RoundEnvironment.java,
* javax/lang/model/SourceVersion.java,
* javax/lang/model/element/Element.java,
* javax/lang/model/element/ElementKind.java:
Add authorship.
* javax/lang/model/element/ElementVisitor.java:
Add authorship and properly document type parameters.
* javax/lang/model/element/TypeElement.java:
Add authorship.
* javax/lang/model/util/ElementFilter.java:
Add authorship.
(FilteredSet.add(E)): Add @Override.
(FilteredSet.addAll(Collection)): Likewise.
(FilteredSet.clear()): Likewise.
(FilteredSet.contains(Object)): Likewise.
(FilteredSet.containsAll(Collection)): Likewise.
(FilteredSet.equals(Object)): Likewise.
(FilteredSet.hashCode()): Likewise.
(FilteredSet.isEmpty()): Likewise.
(FilteredSet.iterator()): Likewise.
(FilteredSet.remove(Object)): Likewise.
(FilteredSet.removeAll(Collection)): Likewise.
(FilteredSet.retainAll(Collection)): Likewise.
(FilteredSet.size()): Likewise.
(FilteredSet.toArray()): Likewise.
(FilteredSet.toArray(T[])): Likewise.
(FilteredIterator.hasNext()): Likewise.
(FilteredIterator.next()): Likewise.
(FilteredIterator.remove()): Likewise.
* javax/lang/model/util/Elements.java,
* javax/lang/model/util/Types.java:
Add authorship.
* javax/tools/ForwardingFileObject.java,
* javax/tools/ForwardingJavaFileObject.java:
Document type parameter.
* javax/tools/StandardLocation.java:
(ANNOTATION_PROCESSOR_PATH.isOutputLocation()):
Add @Override annotation.
(CLASS_OUTPUT.isOutputLocation()): Likewise.
(CLASS_PATH.isOutputLocation()): Likewise.
(PLATFORM_CLASS_PATH.isOutputLocation()): Likewise.
(SOURCE_OUTPUT.isOutputLocation()): Likewise.
(SOURCE_PATH.isOutputLocation()): Likewise.
(getName()): Likewise.
Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
-rw-r--r-- | ChangeLog | 50 | ||||
-rw-r--r-- | javax/annotation/processing/Filer.java | 1 | ||||
-rw-r--r-- | javax/annotation/processing/Messager.java | 1 | ||||
-rw-r--r-- | javax/annotation/processing/ProcessingEnvironment.java | 1 | ||||
-rw-r--r-- | javax/annotation/processing/RoundEnvironment.java | 1 | ||||
-rw-r--r-- | javax/lang/model/SourceVersion.java | 1 | ||||
-rw-r--r-- | javax/lang/model/element/Element.java | 1 | ||||
-rw-r--r-- | javax/lang/model/element/ElementKind.java | 1 | ||||
-rw-r--r-- | javax/lang/model/element/ElementVisitor.java | 9 | ||||
-rw-r--r-- | javax/lang/model/element/TypeElement.java | 1 | ||||
-rw-r--r-- | javax/lang/model/util/ElementFilter.java | 19 | ||||
-rw-r--r-- | javax/lang/model/util/Elements.java | 1 | ||||
-rw-r--r-- | javax/lang/model/util/Types.java | 1 | ||||
-rw-r--r-- | javax/tools/ForwardingFileObject.java | 1 | ||||
-rw-r--r-- | javax/tools/ForwardingJavaFileObject.java | 1 | ||||
-rw-r--r-- | javax/tools/StandardLocation.java | 13 |
16 files changed, 93 insertions, 10 deletions
@@ -1,5 +1,55 @@ 2012-11-25 Andrew John Hughes <gnu_andrew@member.fsf.org> + * javax/annotation/processing/Filer.java, + * javax/annotation/processing/Messager.java, + * javax/annotation/processing/ProcessingEnvironment.java, + * javax/annotation/processing/RoundEnvironment.java, + * javax/lang/model/SourceVersion.java, + * javax/lang/model/element/Element.java, + * javax/lang/model/element/ElementKind.java: + Add authorship. + * javax/lang/model/element/ElementVisitor.java: + Add authorship and properly document type parameters. + * javax/lang/model/element/TypeElement.java: + Add authorship. + * javax/lang/model/util/ElementFilter.java: + Add authorship. + (FilteredSet.add(E)): Add @Override. + (FilteredSet.addAll(Collection)): Likewise. + (FilteredSet.clear()): Likewise. + (FilteredSet.contains(Object)): Likewise. + (FilteredSet.containsAll(Collection)): Likewise. + (FilteredSet.equals(Object)): Likewise. + (FilteredSet.hashCode()): Likewise. + (FilteredSet.isEmpty()): Likewise. + (FilteredSet.iterator()): Likewise. + (FilteredSet.remove(Object)): Likewise. + (FilteredSet.removeAll(Collection)): Likewise. + (FilteredSet.retainAll(Collection)): Likewise. + (FilteredSet.size()): Likewise. + (FilteredSet.toArray()): Likewise. + (FilteredSet.toArray(T[])): Likewise. + (FilteredIterator.hasNext()): Likewise. + (FilteredIterator.next()): Likewise. + (FilteredIterator.remove()): Likewise. + * javax/lang/model/util/Elements.java, + * javax/lang/model/util/Types.java: + Add authorship. + * javax/tools/ForwardingFileObject.java, + * javax/tools/ForwardingJavaFileObject.java: + Document type parameter. + * javax/tools/StandardLocation.java: + (ANNOTATION_PROCESSOR_PATH.isOutputLocation()): + Add @Override annotation. + (CLASS_OUTPUT.isOutputLocation()): Likewise. + (CLASS_PATH.isOutputLocation()): Likewise. + (PLATFORM_CLASS_PATH.isOutputLocation()): Likewise. + (SOURCE_OUTPUT.isOutputLocation()): Likewise. + (SOURCE_PATH.isOutputLocation()): Likewise. + (getName()): Likewise. + +2012-11-25 Andrew John Hughes <gnu_andrew@member.fsf.org> + * javax/tools/FileObject.java: Add missing comment in header. * javax/tools/ForwardingFileObject.java: diff --git a/javax/annotation/processing/Filer.java b/javax/annotation/processing/Filer.java index 8f648245f..21b21f807 100644 --- a/javax/annotation/processing/Filer.java +++ b/javax/annotation/processing/Filer.java @@ -92,6 +92,7 @@ import javax.tools.FileObject; * the class would provide the appropriate generated * subclass via the factory pattern.</p> * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface Filer diff --git a/javax/annotation/processing/Messager.java b/javax/annotation/processing/Messager.java index 97d64470e..b5366efeb 100644 --- a/javax/annotation/processing/Messager.java +++ b/javax/annotation/processing/Messager.java @@ -49,6 +49,7 @@ package javax.annotation.processing; * {@code System.out} and/or {@code System.err} or something * more graphical if the application has a user interface. * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface Messager diff --git a/javax/annotation/processing/ProcessingEnvironment.java b/javax/annotation/processing/ProcessingEnvironment.java index 3fa56cb3e..1fe6b29b5 100644 --- a/javax/annotation/processing/ProcessingEnvironment.java +++ b/javax/annotation/processing/ProcessingEnvironment.java @@ -56,6 +56,7 @@ import javax.lang.model.util.Types; * facility objects, such as the {@code Filer}, so that * these additional changes are reflected throughout. * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface ProcessingEnvironment diff --git a/javax/annotation/processing/RoundEnvironment.java b/javax/annotation/processing/RoundEnvironment.java index 008b9e0ab..3be899ac7 100644 --- a/javax/annotation/processing/RoundEnvironment.java +++ b/javax/annotation/processing/RoundEnvironment.java @@ -50,6 +50,7 @@ import javax.lang.model.element.TypeElement; * of this interface, so that processors can be supplied with an instance * in order to query information about their environment. * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface RoundEnvironment diff --git a/javax/lang/model/SourceVersion.java b/javax/lang/model/SourceVersion.java index 89d88d9fa..e42889dd3 100644 --- a/javax/lang/model/SourceVersion.java +++ b/javax/lang/model/SourceVersion.java @@ -42,6 +42,7 @@ package javax.lang.model; * Note that this will be extended with additional * constants to represent new versions. * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public enum SourceVersion diff --git a/javax/lang/model/element/Element.java b/javax/lang/model/element/Element.java index bd90bed27..8f4adfbbf 100644 --- a/javax/lang/model/element/Element.java +++ b/javax/lang/model/element/Element.java @@ -54,6 +54,7 @@ import java.util.List; * implementations may use the same class to implement multiple * subinterfaces.</p> * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface Element diff --git a/javax/lang/model/element/ElementKind.java b/javax/lang/model/element/ElementKind.java index 95ee134f6..b0bd7501a 100644 --- a/javax/lang/model/element/ElementKind.java +++ b/javax/lang/model/element/ElementKind.java @@ -42,6 +42,7 @@ package javax.lang.model.element; * or a field element. This enumeration may be extended with * further kinds to represent future versions of the language.</p> * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public enum ElementKind diff --git a/javax/lang/model/element/ElementVisitor.java b/javax/lang/model/element/ElementVisitor.java index 0f112b98b..fd184c968 100644 --- a/javax/lang/model/element/ElementVisitor.java +++ b/javax/lang/model/element/ElementVisitor.java @@ -53,11 +53,12 @@ package javax.lang.model.element; * interface. However, this interface should be used as the type * for parameters and return values.</p> * - * @param R the return type of the visitor's methods. {@code Void} - * can be used where there is no return value. - * @param P the type of the additional parameter supplied to the visitor's - * methods. + * @param <R> the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param <P> the type of the additional parameter supplied to the visitor's + * methods. * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface ElementVisitor<R,P> diff --git a/javax/lang/model/element/TypeElement.java b/javax/lang/model/element/TypeElement.java index a0e2c7c99..6cc0c6805 100644 --- a/javax/lang/model/element/TypeElement.java +++ b/javax/lang/model/element/TypeElement.java @@ -57,6 +57,7 @@ package javax.lang.model.element; * file, elements are returned in the order they appear * in the source code.</p> * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface TypeElement diff --git a/javax/lang/model/util/ElementFilter.java b/javax/lang/model/util/ElementFilter.java index b91a1debc..efcc854a5 100644 --- a/javax/lang/model/util/ElementFilter.java +++ b/javax/lang/model/util/ElementFilter.java @@ -54,6 +54,7 @@ import javax.lang.model.element.TypeElement; *<p>For convenience, a static import may be used to allow the * methods to be called more succinctly.</p> * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public class ElementFilter @@ -114,6 +115,7 @@ public class ElementFilter * @param elem the element to add. * @return true if the element was added. */ + @Override public boolean add(E elem) { return elements.add(elem); @@ -128,6 +130,7 @@ public class ElementFilter * @param coll the collection of elements to add. * @return true if the set was modified. */ + @Override public boolean addAll(Collection<? extends E> coll) { return elements.addAll(coll); @@ -136,6 +139,7 @@ public class ElementFilter /** * Removes all elements from the set. */ + @Override public void clear() { elements.clear(); @@ -148,6 +152,7 @@ public class ElementFilter * @param obj the object to check for. * @return true if the backing set contains the element. */ + @Override public boolean contains(Object obj) { if (clazz.isInstance(obj)) @@ -164,6 +169,7 @@ public class ElementFilter * @param coll the collection of elements to check. * @return true if the set contains all elements in {@code coll}. */ + @Override public boolean containsAll(Collection<?> coll) { for (Object obj : coll) @@ -180,6 +186,7 @@ public class ElementFilter * @param obj the object to compare. * @return true if the above requirements are met. */ + @Override public boolean equals(Object obj) { if (obj == null) @@ -199,6 +206,7 @@ public class ElementFilter * * @return the hashcode of this set. */ + @Override public int hashCode() { int sum = 0; @@ -212,6 +220,7 @@ public class ElementFilter * * @return true if the size is zero. */ + @Override public boolean isEmpty() { return size() == 0; @@ -222,6 +231,7 @@ public class ElementFilter * * @return the iterator. */ + @Override public Iterator<E> iterator() { return new FilteredIterator<E>(elements.iterator(), clazz); @@ -233,6 +243,7 @@ public class ElementFilter * @param obj the object to remove. * @return true if the set contained the element. */ + @Override public boolean remove(Object obj) { if (clazz.isInstance(obj)) @@ -248,6 +259,7 @@ public class ElementFilter * @param coll the collection of elements to remove. * @return true if the set changed. */ + @Override public boolean removeAll(Collection<?> coll) { boolean modified = false; @@ -265,6 +277,7 @@ public class ElementFilter * @param coll the collection of elements to remove. * @return true if the set changed. */ + @Override public boolean retainAll(Collection<?> coll) { boolean modified = false; @@ -283,6 +296,7 @@ public class ElementFilter * * @return the size of the set. */ + @Override public int size() { int count = 0; @@ -298,6 +312,7 @@ public class ElementFilter * * @return an array of all elements in the set. */ + @Override public Object[] toArray() { int size = size(); @@ -320,6 +335,7 @@ public class ElementFilter * return value of this method. * @return an array containing all elements in the set. */ + @Override public <T> T[] toArray(T[] array) { int a, size = size(); @@ -383,6 +399,7 @@ public class ElementFilter * * @return true if there are more elements to retrieve. */ + @Override public boolean hasNext() { while (iterator.hasNext() && next == null) @@ -400,6 +417,7 @@ public class ElementFilter * * @return the next element. */ + @Override public E next() { if (next == null) @@ -415,6 +433,7 @@ public class ElementFilter * As we only return elements that match the filter, * the underlying iterator will always remove one of those. */ + @Override public void remove() { iterator.remove(); diff --git a/javax/lang/model/util/Elements.java b/javax/lang/model/util/Elements.java index 2d09b9b23..67f89ef65 100644 --- a/javax/lang/model/util/Elements.java +++ b/javax/lang/model/util/Elements.java @@ -47,6 +47,7 @@ import javax.lang.model.element.TypeElement; /** * Utility methods for operating on elements. * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface Elements diff --git a/javax/lang/model/util/Types.java b/javax/lang/model/util/Types.java index 35abf1a08..18eb58098 100644 --- a/javax/lang/model/util/Types.java +++ b/javax/lang/model/util/Types.java @@ -40,6 +40,7 @@ package javax.lang.model.util; /** * Utility methods for operating on types. * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public interface Types diff --git a/javax/tools/ForwardingFileObject.java b/javax/tools/ForwardingFileObject.java index 33ba40caf..20eb75e84 100644 --- a/javax/tools/ForwardingFileObject.java +++ b/javax/tools/ForwardingFileObject.java @@ -48,6 +48,7 @@ import java.net.URI; /** * Forwards calls to a specified file object. * + * @param <F> the kind of object calls are forwarded to. * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ diff --git a/javax/tools/ForwardingJavaFileObject.java b/javax/tools/ForwardingJavaFileObject.java index a66990d24..fa058cc0d 100644 --- a/javax/tools/ForwardingJavaFileObject.java +++ b/javax/tools/ForwardingJavaFileObject.java @@ -40,6 +40,7 @@ package javax.tools; /** * Forwards calls to a specified {@link JavaFileObject}. * + * @param <F> the kind of object calls are forwarded to. * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ diff --git a/javax/tools/StandardLocation.java b/javax/tools/StandardLocation.java index f3d2cfb63..bb4b70299 100644 --- a/javax/tools/StandardLocation.java +++ b/javax/tools/StandardLocation.java @@ -53,17 +53,17 @@ public enum StandardLocation implements Location { /** Location where annotation processors are found. */ - ANNOTATION_PROCESSOR_PATH { public boolean isOutputLocation() { return false; } }, + ANNOTATION_PROCESSOR_PATH { @Override public boolean isOutputLocation() { return false; } }, /** Location to write class files to. */ - CLASS_OUTPUT { public boolean isOutputLocation() { return true; } }, + CLASS_OUTPUT { @Override public boolean isOutputLocation() { return true; } }, /** Location where class files are found. */ - CLASS_PATH { public boolean isOutputLocation() { return false; } }, + CLASS_PATH { @Override public boolean isOutputLocation() { return false; } }, /** Location where platform class files are found. */ - PLATFORM_CLASS_PATH { public boolean isOutputLocation() { return false; } }, + PLATFORM_CLASS_PATH { @Override public boolean isOutputLocation() { return false; } }, /** Location to write source files to. */ - SOURCE_OUTPUT { public boolean isOutputLocation() { return true; } }, + SOURCE_OUTPUT { @Override public boolean isOutputLocation() { return true; } }, /** Location where source files are found. */ - SOURCE_PATH { public boolean isOutputLocation() { return false; } }; + SOURCE_PATH { @Override public boolean isOutputLocation() { return false; } }; private static final ConcurrentMap<String,Location> locCache = new ConcurrentHashMap<String,Location>(); @@ -80,6 +80,7 @@ public enum StandardLocation * * @return the name of the location. */ + @Override public String getName() { return name(); |