Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjay2018-08-08 03:14:16 -0400
committerJayaprakash Arthanareeswaran2018-08-08 07:42:46 -0400
commita8119f5a19c5e89a1af1d9ee62dbab09a2622af4 (patch)
treeb139d4aa46d9e86c39867663961d797ceb1dbe2b /org.eclipse.jdt.compiler.apt
parent9baccea1e09ccd17f92b0bc90f96b9a3a2cb6cf9 (diff)
downloadeclipse.jdt.core-a8119f5a19c5e89a1af1d9ee62dbab09a2622af4.tar.gz
eclipse.jdt.core-a8119f5a19c5e89a1af1d9ee62dbab09a2622af4.tar.xz
eclipse.jdt.core-a8119f5a19c5e89a1af1d9ee62dbab09a2622af4.zip
Bug 498022 - Annotation Processing: No type annotations returned forI20180810-0320I20180809-2000
annotation values that are arrays of classes Change-Id: I30b8b912e04084cd48eea8a7db72a8385c84f0be Signed-off-by: jay <jarthana@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.compiler.apt')
-rw-r--r--org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/DeclaredTypeImpl.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/DeclaredTypeImpl.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/DeclaredTypeImpl.java
index e9f4c64d4b..422236ef26 100644
--- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/DeclaredTypeImpl.java
+++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/DeclaredTypeImpl.java
@@ -24,8 +24,10 @@ import javax.lang.model.type.TypeMirror;
import javax.lang.model.type.TypeVisitor;
import org.eclipse.jdt.internal.compiler.apt.dispatch.BaseProcessingEnvImpl;
+import org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding;
@@ -55,6 +57,13 @@ public class DeclaredTypeImpl extends TypeMirrorImpl implements DeclaredType {
@Override
public Element asElement() {
+ TypeBinding prototype = null;
+ if (_binding instanceof TypeBinding) {
+ prototype = ((TypeBinding) _binding).prototype();
+ }
+ if (prototype != null) {
+ return _env.getFactory().newElement(prototype, _elementKindHint);
+ }
// The JDT compiler does not distinguish between type elements and declared types
return _env.getFactory().newElement((ReferenceBinding)_binding, _elementKindHint);
}

Back to the top