View | Details | Raw Unified | Return to bug 123470 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/apt/core/internal/declaration/AnnotationMirrorImpl.java (-11 / +11 lines)
Lines 25-32 Link Here
25
import org.eclipse.jdt.core.dom.Annotation;
25
import org.eclipse.jdt.core.dom.Annotation;
26
import org.eclipse.jdt.core.dom.CompilationUnit;
26
import org.eclipse.jdt.core.dom.CompilationUnit;
27
import org.eclipse.jdt.core.dom.IMethodBinding;
27
import org.eclipse.jdt.core.dom.IMethodBinding;
28
import org.eclipse.jdt.core.dom.IResolvedAnnotation;
28
import org.eclipse.jdt.core.dom.IAnnotationBinding;
29
import org.eclipse.jdt.core.dom.IResolvedMemberValuePair;
29
import org.eclipse.jdt.core.dom.IMemberValuePairBinding;
30
import org.eclipse.jdt.core.dom.ITypeBinding;
30
import org.eclipse.jdt.core.dom.ITypeBinding;
31
import org.eclipse.jdt.core.dom.IVariableBinding;
31
import org.eclipse.jdt.core.dom.IVariableBinding;
32
import org.eclipse.jdt.core.dom.MemberValuePair;
32
import org.eclipse.jdt.core.dom.MemberValuePair;
Lines 46-58 Link Here
46
public class AnnotationMirrorImpl implements AnnotationMirror, EclipseMirrorImpl
46
public class AnnotationMirrorImpl implements AnnotationMirror, EclipseMirrorImpl
47
{
47
{
48
    /**The ast node that correspond to the annotation.*/
48
    /**The ast node that correspond to the annotation.*/
49
    private final IResolvedAnnotation _domAnnotation;
49
    private final IAnnotationBinding _domAnnotation;
50
    private final BaseProcessorEnv _env;
50
    private final BaseProcessorEnv _env;
51
    /** the declaration that is annotated by this annotation or the annotation element declaration
51
    /** the declaration that is annotated by this annotation or the annotation element declaration
52
     *  if this is (part of) a default value*/
52
     *  if this is (part of) a default value*/
53
    private final EclipseDeclarationImpl _annotated;
53
    private final EclipseDeclarationImpl _annotated;
54
    
54
    
55
    public AnnotationMirrorImpl(IResolvedAnnotation annotationAstNode, EclipseDeclarationImpl decl, BaseProcessorEnv env)
55
    public AnnotationMirrorImpl(IAnnotationBinding annotationAstNode, EclipseDeclarationImpl decl, BaseProcessorEnv env)
56
    {
56
    {
57
		_domAnnotation = annotationAstNode;
57
		_domAnnotation = annotationAstNode;
58
        _env = env;
58
        _env = env;
Lines 80-93 Link Here
80
80
81
    public Map<AnnotationTypeElementDeclaration, AnnotationValue> getElementValues()
81
    public Map<AnnotationTypeElementDeclaration, AnnotationValue> getElementValues()
82
    {
82
    {
83
		final IResolvedMemberValuePair[] pairs = _domAnnotation.getDeclaredMemberValuePairs();
83
		final IMemberValuePairBinding[] pairs = _domAnnotation.getDeclaredMemberValuePairs();
84
		if (pairs.length == 0) {
84
		if (pairs.length == 0) {
85
			return Collections.emptyMap();
85
			return Collections.emptyMap();
86
		}
86
		}
87
		
87
		
88
		final Map<AnnotationTypeElementDeclaration, AnnotationValue> result =
88
		final Map<AnnotationTypeElementDeclaration, AnnotationValue> result =
89
			new LinkedHashMap<AnnotationTypeElementDeclaration, AnnotationValue>(pairs.length * 4 / 3 + 1 );
89
			new LinkedHashMap<AnnotationTypeElementDeclaration, AnnotationValue>(pairs.length * 4 / 3 + 1 );
90
		for( IResolvedMemberValuePair pair : pairs ){
90
		for( IMemberValuePairBinding pair : pairs ){
91
			 final String name = pair.getName();
91
			 final String name = pair.getName();
92
             if( name == null ) continue;
92
             if( name == null ) continue;
93
             IMethodBinding elementMethod = pair.getMethodBinding();            
93
             IMethodBinding elementMethod = pair.getMethodBinding();            
Lines 142-149 Link Here
142
    public ITypeBinding[] getMemberValueTypeBinding(String membername)
142
    public ITypeBinding[] getMemberValueTypeBinding(String membername)
143
    {
143
    {
144
        if( membername == null ) return null;
144
        if( membername == null ) return null;
145
		final IResolvedMemberValuePair[] declaredPairs = _domAnnotation.getDeclaredMemberValuePairs();
145
		final IMemberValuePairBinding[] declaredPairs = _domAnnotation.getDeclaredMemberValuePairs();
146
		for( IResolvedMemberValuePair pair : declaredPairs ){			
146
		for( IMemberValuePairBinding pair : declaredPairs ){			
147
			if( membername.equals(pair.getName()) ){
147
			if( membername.equals(pair.getName()) ){
148
				final Object value = pair.getValue();
148
				final Object value = pair.getValue();
149
				return getValueTypeBinding(value, pair.getMethodBinding().getReturnType());
149
				return getValueTypeBinding(value, pair.getMethodBinding().getReturnType());
Lines 191-198 Link Here
191
    public Object getValue(final String memberName)
191
    public Object getValue(final String memberName)
192
    {
192
    {
193
		if( memberName == null ) return null;
193
		if( memberName == null ) return null;
194
		final IResolvedMemberValuePair[] declaredPairs = _domAnnotation.getDeclaredMemberValuePairs();
194
		final IMemberValuePairBinding[] declaredPairs = _domAnnotation.getDeclaredMemberValuePairs();
195
		for( IResolvedMemberValuePair pair : declaredPairs ){			
195
		for( IMemberValuePairBinding pair : declaredPairs ){			
196
			if( memberName.equals(pair.getName()) ){
196
			if( memberName.equals(pair.getName()) ){
197
				return pair.getValue();				
197
				return pair.getValue();				
198
			}
198
			}
Lines 221-227 Link Here
221
        return null;
221
        return null;
222
    }
222
    }
223
    
223
    
224
    public IResolvedAnnotation getResolvedAnnotaion(){return _domAnnotation; }
224
    public IAnnotationBinding getResolvedAnnotaion(){return _domAnnotation; }
225
225
226
    
226
    
227
227
(-)src/org/eclipse/jdt/apt/core/internal/declaration/ASTBasedDeclarationImpl.java (-7 / +7 lines)
Lines 22-28 Link Here
22
import org.eclipse.jdt.core.dom.BodyDeclaration;
22
import org.eclipse.jdt.core.dom.BodyDeclaration;
23
import org.eclipse.jdt.core.dom.CompilationUnit;
23
import org.eclipse.jdt.core.dom.CompilationUnit;
24
import org.eclipse.jdt.core.dom.IExtendedModifier;
24
import org.eclipse.jdt.core.dom.IExtendedModifier;
25
import org.eclipse.jdt.core.dom.IResolvedAnnotation;
25
import org.eclipse.jdt.core.dom.IAnnotationBinding;
26
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
26
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
27
import org.eclipse.jdt.core.dom.VariableDeclaration;
27
import org.eclipse.jdt.core.dom.VariableDeclaration;
28
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
28
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
Lines 111-129 Link Here
111
	
111
	
112
	public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
112
	public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
113
    {
113
    {
114
		final IResolvedAnnotation[] instances = getAnnotationInstancesFromAST();
114
		final IAnnotationBinding[] instances = getAnnotationInstancesFromAST();
115
		return _getAnnotation(annotationClass, instances);
115
		return _getAnnotation(annotationClass, instances);
116
    }
116
    }
117
117
118
    public Collection<AnnotationMirror> getAnnotationMirrors()
118
    public Collection<AnnotationMirror> getAnnotationMirrors()
119
    {
119
    {
120
		final IResolvedAnnotation[] instances = getAnnotationInstancesFromAST();
120
		final IAnnotationBinding[] instances = getAnnotationInstancesFromAST();
121
		return _getAnnotationMirrors(instances);		
121
		return _getAnnotationMirrors(instances);		
122
    }
122
    }
123
	
123
	
124
	private IResolvedAnnotation[] getAnnotationInstancesFromAST()
124
	private IAnnotationBinding[] getAnnotationInstancesFromAST()
125
	{	
125
	{	
126
		IResolvedAnnotation[] instances = null;
126
		IAnnotationBinding[] instances = null;
127
		List extendsMods = null;
127
		List extendsMods = null;
128
		switch( _astNode.getNodeType() )
128
		switch( _astNode.getNodeType() )
129
		{
129
		{
Lines 156-168 Link Here
156
				if( extMod.isAnnotation() )
156
				if( extMod.isAnnotation() )
157
					count ++;
157
					count ++;
158
			}
158
			}
159
			instances = new IResolvedAnnotation[count];
159
			instances = new IAnnotationBinding[count];
160
			int index = 0;
160
			int index = 0;
161
			for( Object obj : extendsMods ){
161
			for( Object obj : extendsMods ){
162
				final IExtendedModifier extMod = (IExtendedModifier)obj;
162
				final IExtendedModifier extMod = (IExtendedModifier)obj;
163
				if( extMod.isAnnotation() )
163
				if( extMod.isAnnotation() )
164
					instances[index ++] = 
164
					instances[index ++] = 
165
						((org.eclipse.jdt.core.dom.Annotation)extMod).resolveAnnotation();
165
						((org.eclipse.jdt.core.dom.Annotation)extMod).resolveAnnotationBinding();
166
			}
166
			}
167
		}
167
		}
168
		return instances;
168
		return instances;
(-)src/org/eclipse/jdt/apt/core/internal/declaration/BinaryParameterDeclarationImpl.java (-3 / +3 lines)
Lines 28-34 Link Here
28
import org.eclipse.jdt.core.dom.ASTNode;
28
import org.eclipse.jdt.core.dom.ASTNode;
29
import org.eclipse.jdt.core.dom.IBinding;
29
import org.eclipse.jdt.core.dom.IBinding;
30
import org.eclipse.jdt.core.dom.IMethodBinding;
30
import org.eclipse.jdt.core.dom.IMethodBinding;
31
import org.eclipse.jdt.core.dom.IResolvedAnnotation;
31
import org.eclipse.jdt.core.dom.IAnnotationBinding;
32
import org.eclipse.jdt.core.dom.ITypeBinding;
32
import org.eclipse.jdt.core.dom.ITypeBinding;
33
import org.eclipse.jdt.core.dom.SimpleName;
33
import org.eclipse.jdt.core.dom.SimpleName;
34
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
34
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
Lines 101-114 Link Here
101
    public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
101
    public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
102
    {
102
    {
103
		final IMethodBinding methodBinding = _executable.getDeclarationBinding();
103
		final IMethodBinding methodBinding = _executable.getDeclarationBinding();
104
		final IResolvedAnnotation[] paramAnnos = methodBinding.getParameterAnnotations(_paramIndex); 
104
		final IAnnotationBinding[] paramAnnos = methodBinding.getParameterAnnotations(_paramIndex); 
105
        return _getAnnotation(annotationClass, paramAnnos);
105
        return _getAnnotation(annotationClass, paramAnnos);
106
    }
106
    }
107
107
108
    public Collection<AnnotationMirror> getAnnotationMirrors()
108
    public Collection<AnnotationMirror> getAnnotationMirrors()
109
    {
109
    {
110
		final IMethodBinding methodBinding = _executable.getDeclarationBinding();
110
		final IMethodBinding methodBinding = _executable.getDeclarationBinding();
111
		final IResolvedAnnotation[] paramAnnos = methodBinding.getParameterAnnotations(_paramIndex); 
111
		final IAnnotationBinding[] paramAnnos = methodBinding.getParameterAnnotations(_paramIndex); 
112
        return _getAnnotationMirrors(paramAnnos);
112
        return _getAnnotationMirrors(paramAnnos);
113
    }    
113
    }    
114
    
114
    
(-)src/org/eclipse/jdt/apt/core/internal/declaration/EclipseDeclarationImpl.java (-6 / +6 lines)
Lines 30-36 Link Here
30
import org.eclipse.jdt.core.dom.CompilationUnit;
30
import org.eclipse.jdt.core.dom.CompilationUnit;
31
import org.eclipse.jdt.core.dom.EnumConstantDeclaration;
31
import org.eclipse.jdt.core.dom.EnumConstantDeclaration;
32
import org.eclipse.jdt.core.dom.FieldDeclaration;
32
import org.eclipse.jdt.core.dom.FieldDeclaration;
33
import org.eclipse.jdt.core.dom.IResolvedAnnotation;
33
import org.eclipse.jdt.core.dom.IAnnotationBinding;
34
import org.eclipse.jdt.core.dom.ITypeBinding;
34
import org.eclipse.jdt.core.dom.ITypeBinding;
35
import org.eclipse.jdt.core.dom.Javadoc;
35
import org.eclipse.jdt.core.dom.Javadoc;
36
import org.eclipse.jdt.core.dom.MethodDeclaration;
36
import org.eclipse.jdt.core.dom.MethodDeclaration;
Lines 58-64 Link Here
58
    }        
58
    }        
59
59
60
    <A extends Annotation> A _getAnnotation(Class<A> annotationClass,
60
    <A extends Annotation> A _getAnnotation(Class<A> annotationClass,
61
                                            IResolvedAnnotation[] annoInstances)
61
                                            IAnnotationBinding[] annoInstances)
62
    {
62
    {
63
    	if( annoInstances == null || annoInstances.length == 0 || annotationClass == null ) 
63
    	if( annoInstances == null || annoInstances.length == 0 || annotationClass == null ) 
64
    		return null;
64
    		return null;
Lines 68-74 Link Here
68
        annoTypeName = annoTypeName.replace('$', '.');
68
        annoTypeName = annoTypeName.replace('$', '.');
69
		final int len = annoInstances == null ? 0 : annoInstances.length;
69
		final int len = annoInstances == null ? 0 : annoInstances.length;
70
        if( len == 0 ) return null;
70
        if( len == 0 ) return null;
71
        for( IResolvedAnnotation annoInstance :  annoInstances){
71
        for( IAnnotationBinding annoInstance :  annoInstances){
72
            final ITypeBinding binding = annoInstance.getAnnotationType();            
72
            final ITypeBinding binding = annoInstance.getAnnotationType();            
73
            if( binding != null && binding.isAnnotation() ){
73
            if( binding != null && binding.isAnnotation() ){
74
                final String curTypeName = binding.getQualifiedName();
74
                final String curTypeName = binding.getQualifiedName();
Lines 84-95 Link Here
84
        return null; 
84
        return null; 
85
    }
85
    }
86
86
87
    Collection<AnnotationMirror> _getAnnotationMirrors(IResolvedAnnotation[] annoInstances)
87
    Collection<AnnotationMirror> _getAnnotationMirrors(IAnnotationBinding[] annoInstances)
88
    {
88
    {
89
		final int len = annoInstances == null ? 0 : annoInstances.length;
89
		final int len = annoInstances == null ? 0 : annoInstances.length;
90
        if( len == 0 ) return Collections.emptyList();
90
        if( len == 0 ) return Collections.emptyList();
91
        final List<AnnotationMirror> result = new ArrayList<AnnotationMirror>(len);
91
        final List<AnnotationMirror> result = new ArrayList<AnnotationMirror>(len);
92
        for(IResolvedAnnotation annoInstance : annoInstances){
92
        for(IAnnotationBinding annoInstance : annoInstances){
93
            final AnnotationMirrorImpl annoMirror =
93
            final AnnotationMirrorImpl annoMirror =
94
                        (AnnotationMirrorImpl)Factory.createAnnotationMirror(annoInstance, this, _env);
94
                        (AnnotationMirrorImpl)Factory.createAnnotationMirror(annoInstance, this, _env);
95
            result.add(annoMirror);
95
            result.add(annoMirror);
Lines 103-109 Link Here
103
		final List<AnnotationMirror> result = new ArrayList<AnnotationMirror>(annoInstances.size());
103
		final List<AnnotationMirror> result = new ArrayList<AnnotationMirror>(annoInstances.size());
104
		for( org.eclipse.jdt.core.dom.Annotation annoInstance : annoInstances){
104
		for( org.eclipse.jdt.core.dom.Annotation annoInstance : annoInstances){
105
			final AnnotationMirrorImpl annoMirror =
105
			final AnnotationMirrorImpl annoMirror =
106
				(AnnotationMirrorImpl)Factory.createAnnotationMirror(annoInstance.resolveAnnotation(), this, _env);
106
				(AnnotationMirrorImpl)Factory.createAnnotationMirror(annoInstance.resolveAnnotationBinding(), this, _env);
107
			result.add(annoMirror);
107
			result.add(annoMirror);
108
		}
108
		}
109
		return result;
109
		return result;
(-)src/org/eclipse/jdt/apt/core/internal/declaration/MemberDeclarationImpl.java (-4 / +4 lines)
Lines 38-57 Link Here
38
    
38
    
39
    public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
39
    public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
40
    {
40
    {
41
		final IResolvedAnnotation[] instances = getAnnotationInstances();
41
		final IAnnotationBinding[] instances = getAnnotationInstances();
42
		return _getAnnotation(annotationClass, instances);
42
		return _getAnnotation(annotationClass, instances);
43
    }
43
    }
44
44
45
    public Collection<AnnotationMirror> getAnnotationMirrors()
45
    public Collection<AnnotationMirror> getAnnotationMirrors()
46
    {
46
    {
47
		final IResolvedAnnotation[] instances = getAnnotationInstances();
47
		final IAnnotationBinding[] instances = getAnnotationInstances();
48
		return _getAnnotationMirrors(instances);		
48
		return _getAnnotationMirrors(instances);		
49
    }
49
    }
50
	
50
	
51
	private IResolvedAnnotation[] getAnnotationInstances()
51
	private IAnnotationBinding[] getAnnotationInstances()
52
	{
52
	{
53
		final IBinding binding = getDeclarationBinding();
53
		final IBinding binding = getDeclarationBinding();
54
		final IResolvedAnnotation[] instances;
54
		final IAnnotationBinding[] instances;
55
		switch( binding.getKind() )
55
		switch( binding.getKind() )
56
		{
56
		{
57
		case IBinding.TYPE:
57
		case IBinding.TYPE:
(-)src/org/eclipse/jdt/apt/core/internal/env/AnnotationInvocationHandler.java (-3 / +3 lines)
Lines 26-32 Link Here
26
import org.eclipse.jdt.apt.core.internal.declaration.AnnotationMirrorImpl;
26
import org.eclipse.jdt.apt.core.internal.declaration.AnnotationMirrorImpl;
27
import org.eclipse.jdt.apt.core.internal.util.Factory;
27
import org.eclipse.jdt.apt.core.internal.util.Factory;
28
import org.eclipse.jdt.core.dom.IMethodBinding;
28
import org.eclipse.jdt.core.dom.IMethodBinding;
29
import org.eclipse.jdt.core.dom.IResolvedAnnotation;
29
import org.eclipse.jdt.core.dom.IAnnotationBinding;
30
import org.eclipse.jdt.core.dom.ITypeBinding;
30
import org.eclipse.jdt.core.dom.ITypeBinding;
31
import org.eclipse.jdt.core.dom.IVariableBinding;
31
import org.eclipse.jdt.core.dom.IVariableBinding;
32
32
Lines 195-205 Link Here
195
	    else if( domValue instanceof ITypeBinding )
195
	    else if( domValue instanceof ITypeBinding )
196
			throw new IllegalStateException("sourceValue is a type binding."); //$NON-NLS-1$
196
			throw new IllegalStateException("sourceValue is a type binding."); //$NON-NLS-1$
197
		
197
		
198
	    else if( domValue instanceof IResolvedAnnotation )
198
	    else if( domValue instanceof IAnnotationBinding )
199
		{
199
		{
200
			final AnnotationMirrorImpl annoMirror = 
200
			final AnnotationMirrorImpl annoMirror = 
201
				(AnnotationMirrorImpl)Factory.createAnnotationMirror(
201
				(AnnotationMirrorImpl)Factory.createAnnotationMirror(
202
					(IResolvedAnnotation)domValue, 
202
					(IAnnotationBinding)domValue, 
203
					_instance.getAnnotatedDeclaration(), 
203
					_instance.getAnnotatedDeclaration(), 
204
					_instance.getEnvironment());
204
					_instance.getEnvironment());
205
	        final AnnotationInvocationHandler handler = new AnnotationInvocationHandler(annoMirror, expectedType);
205
	        final AnnotationInvocationHandler handler = new AnnotationInvocationHandler(annoMirror, expectedType);
(-)src/org/eclipse/jdt/apt/core/internal/util/Factory.java (-5 / +5 lines)
Lines 55-61 Link Here
55
import org.eclipse.jdt.apt.core.internal.type.WildcardTypeImpl;
55
import org.eclipse.jdt.apt.core.internal.type.WildcardTypeImpl;
56
import org.eclipse.jdt.core.dom.ASTNode;
56
import org.eclipse.jdt.core.dom.ASTNode;
57
import org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration;
57
import org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration;
58
import org.eclipse.jdt.core.dom.IResolvedAnnotation;
58
import org.eclipse.jdt.core.dom.IAnnotationBinding;
59
import org.eclipse.jdt.core.dom.IBinding;
59
import org.eclipse.jdt.core.dom.IBinding;
60
import org.eclipse.jdt.core.dom.IMethodBinding;
60
import org.eclipse.jdt.core.dom.IMethodBinding;
61
import org.eclipse.jdt.core.dom.ITypeBinding;
61
import org.eclipse.jdt.core.dom.ITypeBinding;
Lines 221-227 Link Here
221
     * @param env
221
     * @param env
222
     * @return a newly created {@link AnnotationMirror} object
222
     * @return a newly created {@link AnnotationMirror} object
223
     */
223
     */
224
    public static AnnotationMirror createAnnotationMirror(final IResolvedAnnotation annotation,
224
    public static AnnotationMirror createAnnotationMirror(final IAnnotationBinding annotation,
225
                                                          final EclipseDeclarationImpl annotated,
225
                                                          final EclipseDeclarationImpl annotated,
226
                                                          final BaseProcessorEnv env)
226
                                                          final BaseProcessorEnv env)
227
    {
227
    {
Lines 366-372 Link Here
366
				Object o = convertDOMValueToMirrorValue( elements[i], name, parent, decl, env, leaf );				
366
				Object o = convertDOMValueToMirrorValue( elements[i], name, parent, decl, env, leaf );				
367
				if( o == null ) 
367
				if( o == null ) 
368
					return null; 
368
					return null; 
369
				assert( !( o instanceof IResolvedAnnotation ) ) : 
369
				assert( !( o instanceof IAnnotationBinding ) ) : 
370
					"Unexpected return value from convertDomValueToMirrorValue! o.getClass().getName() = " //$NON-NLS-1$
370
					"Unexpected return value from convertDomValueToMirrorValue! o.getClass().getName() = " //$NON-NLS-1$
371
					+ o.getClass().getName(); 
371
					+ o.getClass().getName(); 
372
				
372
				
Lines 380-388 Link Here
380
        else if( domValue instanceof ITypeBinding )
380
        else if( domValue instanceof ITypeBinding )
381
			returnValue = Factory.createTypeMirror((ITypeBinding)domValue, env);
381
			returnValue = Factory.createTypeMirror((ITypeBinding)domValue, env);
382
		
382
		
383
        else if( domValue instanceof IResolvedAnnotation )
383
        else if( domValue instanceof IAnnotationBinding )
384
		{
384
		{
385
			returnValue = Factory.createAnnotationMirror((IResolvedAnnotation)domValue, decl, env);
385
			returnValue = Factory.createAnnotationMirror((IAnnotationBinding)domValue, decl, env);
386
		}
386
		}
387
        else	        
387
        else	        
388
			// should never reach this point
388
			// should never reach this point
(-)src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java (-3 / +3 lines)
Lines 21-27 Link Here
21
import org.eclipse.jdt.core.dom.ASTRequestor;
21
import org.eclipse.jdt.core.dom.ASTRequestor;
22
import org.eclipse.jdt.core.dom.IBinding;
22
import org.eclipse.jdt.core.dom.IBinding;
23
import org.eclipse.jdt.core.dom.IMethodBinding;
23
import org.eclipse.jdt.core.dom.IMethodBinding;
24
import org.eclipse.jdt.core.dom.IResolvedAnnotation;
24
import org.eclipse.jdt.core.dom.IAnnotationBinding;
25
import org.eclipse.jdt.core.dom.ITypeBinding;
25
import org.eclipse.jdt.core.dom.ITypeBinding;
26
import org.eclipse.jdt.core.dom.IVariableBinding;
26
import org.eclipse.jdt.core.dom.IVariableBinding;
27
import org.eclipse.jdt.core.tests.builder.Tests;
27
import org.eclipse.jdt.core.tests.builder.Tests;
Lines 307-313 Link Here
307
		}
307
		}
308
	}
308
	}
309
	
309
	
310
	private void assertAnnotation(final String[] expected, IResolvedAnnotation[] annotations)
310
	private void assertAnnotation(final String[] expected, IAnnotationBinding[] annotations)
311
	{
311
	{
312
		final int expectedLen = expected.length;		
312
		final int expectedLen = expected.length;		
313
		TestCase.assertEquals("annotation number mismatch", expected.length, annotations.length); //$NON-NLS-1$
313
		TestCase.assertEquals("annotation number mismatch", expected.length, annotations.length); //$NON-NLS-1$
Lines 317-323 Link Here
317
			expectedSet.add(expected[i]);
317
			expectedSet.add(expected[i]);
318
			
318
			
319
		int counter = 0;
319
		int counter = 0;
320
		for( IResolvedAnnotation mirror : annotations ){
320
		for( IAnnotationBinding mirror : annotations ){
321
			if( counter >= expectedLen )
321
			if( counter >= expectedLen )
322
				TestCase.assertEquals("", mirror.toString()); //$NON-NLS-1$
322
				TestCase.assertEquals("", mirror.toString()); //$NON-NLS-1$
323
			else{
323
			else{

Return to bug 123470