summaryrefslogtreecommitdiff
path: root/java/java-psi-api/src/com/intellij/psi/PsiAnnotation.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-psi-api/src/com/intellij/psi/PsiAnnotation.java')
-rw-r--r--java/java-psi-api/src/com/intellij/psi/PsiAnnotation.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/java/java-psi-api/src/com/intellij/psi/PsiAnnotation.java b/java/java-psi-api/src/com/intellij/psi/PsiAnnotation.java
index dd80c5a0bb12..d2c9c77f6d2e 100644
--- a/java/java-psi-api/src/com/intellij/psi/PsiAnnotation.java
+++ b/java/java-psi-api/src/com/intellij/psi/PsiAnnotation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2012 JetBrains s.r.o.
+ * Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,6 +42,18 @@ public interface PsiAnnotation extends PsiAnnotationMemberValue, PsiMetaOwner {
@NonNls String DEFAULT_REFERENCED_METHOD_NAME = "value";
/**
+ * Kinds of element to which an annotation type is applicable (see {@link java.lang.annotation.ElementType}).
+ */
+ enum TargetType {
+ // see java.lang.annotation.ElementType
+ TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_USE, TYPE_PARAMETER,
+ // auxiliary value, used when it's impossible to determine annotation's targets
+ UNKNOWN;
+
+ public static final TargetType[] EMPTY_ARRAY = {};
+ }
+
+ /**
* Returns the list of parameters for the annotation.
*
* @return the parameter list instance.
@@ -69,8 +81,8 @@ public interface PsiAnnotation extends PsiAnnotationMemberValue, PsiMetaOwner {
/**
* Returns the value of the annotation element with the specified name.
*
- * @param attributeName name of the annotation element for which the value is requested. If it isn't defined in annotation, the default
- * value is returned.
+ * @param attributeName name of the annotation element for which the value is requested. If it isn't defined in annotation,
+ * the default value is returned.
* @return the element value, or null if the annotation does not contain a value for
* the element and the element has no default value.
*/