Lines 84-91
Link Here
|
84 |
int length = internalAnnotations == null ? 0 : internalAnnotations.length; |
84 |
int length = internalAnnotations == null ? 0 : internalAnnotations.length; |
85 |
if (length > 0) { |
85 |
if (length > 0) { |
86 |
domInstances = new AnnotationBinding[length]; |
86 |
domInstances = new AnnotationBinding[length]; |
87 |
for (int i = 0; i < length; i++) |
87 |
for (int i = 0; i < length; i++) { |
88 |
domInstances[i] = this.resolver.getAnnotationInstance(internalAnnotations[i]); |
88 |
IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(internalAnnotations[i]); |
|
|
89 |
if (annotationInstance == null) { |
90 |
return AnnotationBinding.NoAnnotations; |
91 |
} |
92 |
domInstances[i] = annotationInstance; |
93 |
} |
89 |
} |
94 |
} |
90 |
} |
95 |
} |
91 |
return domInstances; |
96 |
return domInstances; |
Lines 241-247
Link Here
|
241 |
int length = members.length; |
246 |
int length = members.length; |
242 |
ITypeBinding[] newMembers = new ITypeBinding[length]; |
247 |
ITypeBinding[] newMembers = new ITypeBinding[length]; |
243 |
for (int i = 0; i < length; i++) { |
248 |
for (int i = 0; i < length; i++) { |
244 |
newMembers[i] = this.resolver.getTypeBinding(members[i]); |
249 |
ITypeBinding typeBinding = this.resolver.getTypeBinding(members[i]); |
|
|
250 |
if (typeBinding == null) { |
251 |
return NO_TYPE_BINDINGS; |
252 |
} |
253 |
newMembers[i] = typeBinding; |
245 |
} |
254 |
} |
246 |
return newMembers; |
255 |
return newMembers; |
247 |
} |
256 |
} |
Lines 392-398
Link Here
|
392 |
} else { |
401 |
} else { |
393 |
ITypeBinding[] newInterfaces = new ITypeBinding[length]; |
402 |
ITypeBinding[] newInterfaces = new ITypeBinding[length]; |
394 |
for (int i = 0; i < length; i++) { |
403 |
for (int i = 0; i < length; i++) { |
395 |
newInterfaces[i] = this.resolver.getTypeBinding(interfaces[i]); |
404 |
ITypeBinding typeBinding = this.resolver.getTypeBinding(interfaces[i]); |
|
|
405 |
if (typeBinding == null) { |
406 |
return NO_TYPE_BINDINGS; |
407 |
} |
408 |
newInterfaces[i] = typeBinding; |
396 |
} |
409 |
} |
397 |
return newInterfaces; |
410 |
return newInterfaces; |
398 |
} |
411 |
} |
Lines 470-476
Link Here
|
470 |
IMethod declaringMethod = (IMethod) declaringTypeBinding.getJavaElement(); |
483 |
IMethod declaringMethod = (IMethod) declaringTypeBinding.getJavaElement(); |
471 |
return (JavaElement) declaringMethod.getTypeParameter(typeVariableName); |
484 |
return (JavaElement) declaringMethod.getTypeParameter(typeVariableName); |
472 |
} else { |
485 |
} else { |
473 |
declaringTypeBinding = this.resolver.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement); |
486 |
ITypeBinding typeBinding2 = this.resolver.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement); |
|
|
487 |
if (typeBinding2 == null) return null; |
488 |
declaringTypeBinding = typeBinding2; |
474 |
IType declaringType = (IType) declaringTypeBinding.getJavaElement(); |
489 |
IType declaringType = (IType) declaringTypeBinding.getJavaElement(); |
475 |
return (JavaElement) declaringType.getTypeParameter(typeVariableName); |
490 |
return (JavaElement) declaringType.getTypeParameter(typeVariableName); |
476 |
} |
491 |
} |
Lines 827-833
Link Here
|
827 |
int argumentsLength = arguments.length; |
842 |
int argumentsLength = arguments.length; |
828 |
ITypeBinding[] typeArguments = new ITypeBinding[argumentsLength]; |
843 |
ITypeBinding[] typeArguments = new ITypeBinding[argumentsLength]; |
829 |
for (int i = 0; i < argumentsLength; i++) { |
844 |
for (int i = 0; i < argumentsLength; i++) { |
830 |
typeArguments[i] = this.resolver.getTypeBinding(arguments[i]); |
845 |
ITypeBinding typeBinding = this.resolver.getTypeBinding(arguments[i]); |
|
|
846 |
if (typeBinding == null) { |
847 |
return NO_TYPE_BINDINGS; |
848 |
} |
849 |
typeArguments[i] = typeBinding; |
831 |
} |
850 |
} |
832 |
return typeArguments; |
851 |
return typeArguments; |
833 |
} |
852 |
} |
Lines 863-873
Link Here
|
863 |
ITypeBinding[] typeBounds = new ITypeBinding[boundsLength]; |
882 |
ITypeBinding[] typeBounds = new ITypeBinding[boundsLength]; |
864 |
int boundsIndex = 0; |
883 |
int boundsIndex = 0; |
865 |
if (firstClassOrArrayBound != null) { |
884 |
if (firstClassOrArrayBound != null) { |
866 |
typeBounds[boundsIndex++] = this.resolver.getTypeBinding(firstClassOrArrayBound); |
885 |
ITypeBinding typeBinding = this.resolver.getTypeBinding(firstClassOrArrayBound); |
|
|
886 |
if (typeBinding == null) { |
887 |
return NO_TYPE_BINDINGS; |
888 |
} |
889 |
typeBounds[boundsIndex++] = typeBinding; |
867 |
} |
890 |
} |
868 |
if (superinterfaces != null) { |
891 |
if (superinterfaces != null) { |
869 |
for (int i = 0; i < superinterfacesLength; i++, boundsIndex++) { |
892 |
for (int i = 0; i < superinterfacesLength; i++, boundsIndex++) { |
870 |
typeBounds[boundsIndex] = this.resolver.getTypeBinding(superinterfaces[i]); |
893 |
ITypeBinding typeBinding = this.resolver.getTypeBinding(superinterfaces[i]); |
|
|
894 |
if (typeBinding == null) { |
895 |
return NO_TYPE_BINDINGS; |
896 |
} |
897 |
typeBounds[boundsIndex] = typeBinding; |
871 |
} |
898 |
} |
872 |
} |
899 |
} |
873 |
return typeBounds; |
900 |
return typeBounds; |
Lines 891-897
Link Here
|
891 |
if (typeVariableBindingsLength != 0) { |
918 |
if (typeVariableBindingsLength != 0) { |
892 |
ITypeBinding[] typeParameters = new ITypeBinding[typeVariableBindingsLength]; |
919 |
ITypeBinding[] typeParameters = new ITypeBinding[typeVariableBindingsLength]; |
893 |
for (int i = 0; i < typeVariableBindingsLength; i++) { |
920 |
for (int i = 0; i < typeVariableBindingsLength; i++) { |
894 |
typeParameters[i] = this.resolver.getTypeBinding(typeVariableBindings[i]); |
921 |
ITypeBinding typeBinding = this.resolver.getTypeBinding(typeVariableBindings[i]); |
|
|
922 |
if (typeBinding == null) { |
923 |
return NO_TYPE_BINDINGS; |
924 |
} |
925 |
typeParameters[i] = typeBinding; |
895 |
} |
926 |
} |
896 |
return typeParameters; |
927 |
return typeParameters; |
897 |
} |
928 |
} |