diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2012-11-13 20:30:27 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2012-11-13 20:30:27 +0000 |
commit | c54ec9a581cb50d3ee475b11a294c56ff6e15208 (patch) | |
tree | 0f5251626db8289764982b87cc13ee5e0f961f4a | |
parent | c225934da3e25feb0ece274f8c4978c95938301a (diff) | |
download | classpath-c54ec9a581cb50d3ee475b11a294c56ff6e15208.tar.gz |
Add remaining methods of ProcessingEnvironment so the ecj implementation compiles.
2012-11-13 Andrew John Hughes <gnu_andrew@member.fsf.org>
* javax/annotation/processing/ProcessingEnvironment.java:
(getOptions()): Implemented.
(getSourceVersion()): Likewise.
(getTypeUtils()): Likewise.
Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | javax/annotation/processing/ProcessingEnvironment.java | 32 |
2 files changed, 39 insertions, 0 deletions
@@ -1,3 +1,10 @@ +2012-11-13 Andrew John Hughes <gnu_andrew@member.fsf.org> + + * javax/annotation/processing/ProcessingEnvironment.java: + (getOptions()): Implemented. + (getSourceVersion()): Likewise. + (getTypeUtils()): Likewise. + 2012-11-12 Andrew John Hughes <gnu_andrew@member.fsf.org> New files to start supporting recent versions diff --git a/javax/annotation/processing/ProcessingEnvironment.java b/javax/annotation/processing/ProcessingEnvironment.java index 4373ad9da..3fa56cb3e 100644 --- a/javax/annotation/processing/ProcessingEnvironment.java +++ b/javax/annotation/processing/ProcessingEnvironment.java @@ -38,8 +38,12 @@ exception statement from your version. */ package javax.annotation.processing; import java.util.Locale; +import java.util.Map; + +import javax.lang.model.SourceVersion; import javax.lang.model.util.Elements; +import javax.lang.model.util.Types; /** * Provides the annotation processor with access to the @@ -95,6 +99,34 @@ public interface ProcessingEnvironment */ Messager getMessager(); + /** + * Returns the options passed to the annotation processor + * as a map of option names to values. If an option does + * not have a value, it will map to {@code null}. For + * details of the options themselves, see the documentation + * for the annotation processor. + * + * @return a map of the options passed to the annotation processor. + */ + Map<String,String> getOptions(); + /** + * Returns the version of Java source code that generated + * source files and class files should conform to. + * + * @return the version of Java code used in generated files. + * @see Processor#getSupportedSourceVersion() + */ + SourceVersion getSourceVersion(); + /** + * Returns an implementation of a number of utility + * methods which provide additional functionality for + * working with (@link javax.lang.model.type.TypeMirror} + * instances. + * + * @return the type utilities. + */ + Types getTypeUtils(); + } |