summaryrefslogtreecommitdiff
path: root/javax/annotation/processing/Completion.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2013-02-22 16:46:40 +1100
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2013-02-22 16:46:40 +1100
commit2a0cb4d76201ee1e6c9a879056e5ac0aea00a7b1 (patch)
treebe4743dbf8ceb1bb08459b1e40485898708b6349 /javax/annotation/processing/Completion.java
parentb004826deb64618f4eebcbc21abed78319082abc (diff)
downloadclasspath-2a0cb4d76201ee1e6c9a879056e5ac0aea00a7b1.tar.gz
Implement AbstractProcessor, adding annotations and an interface it depends on.
2013-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/annotation/processing/AbstractProcessor.java: New class added. (processingEnv): Added. (initialized): Likewise. (AbstractProcessor()): Implemented. (getCompletions(Element,AnnotationMirror,ExecutableElement, String)): Likewise. (getSupportedAnnotationTypes()):Likewise. (getSupportedOptions()): Likewise. (getSupportedSourceVersion()): Likewise. (init(ProcessingEnvironment)): Likewise. (isInitialized()): Likewise. (process(Set,RoundEnvironment)): Likewise. * javax/annotation/processing/Completion.java: New interface added. (getValue()): Added. (getMessage()): Likewise. * javax/annotation/processing/Processor.java: (getCompletions(Element,AnnotationMirror,ExecutableElement, String)): Added. * javax/annotation/processing/SupportedAnnotationTypes.java: New annotation added. (value()): Added. * javax/annotation/processing/SupportedOptions.java: New annotation added. (value()): Added. * javax/annotation/processing/SupportedSourceVersion.java: Reference AbstractProcessor in documentation. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
Diffstat (limited to 'javax/annotation/processing/Completion.java')
-rw-r--r--javax/annotation/processing/Completion.java65
1 files changed, 65 insertions, 0 deletions
diff --git a/javax/annotation/processing/Completion.java b/javax/annotation/processing/Completion.java
new file mode 100644
index 000000000..a865d3174
--- /dev/null
+++ b/javax/annotation/processing/Completion.java
@@ -0,0 +1,65 @@
+/* Completion.java -- Suggested completion for an annotation.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.annotation.processing;
+
+/**
+ * A suggested completion for an annotation. It contains
+ * text which may be used in an annotation, together with
+ * an optional message describing it.
+ *
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.6
+ */
+public interface Completion
+{
+
+ /**
+ * Returns the suggested annotation text.
+ *
+ * @return the suggested text.
+ */
+ String getValue();
+
+ /**
+ * Returns a description of the suggested completion.
+ *
+ * @return a message about the completion.
+ */
+ String getMessage();
+
+}