if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
List allTypeAnnotationContexts = new ArrayList();
int invisibleTypeAnnotationsCounter = 0;
int visibleTypeAnnotationsCounter = 0;
AbstractMethodDeclaration methodDeclaration = binding.sourceMethod();
if (methodDeclaration != null) {
if ((methodDeclaration.bits & ASTNode.HasTypeAnnotations) != 0) {
Argument[] arguments = methodDeclaration.arguments;
if (arguments != null) {
completeArgumentAnnotationInfo(arguments, allTypeAnnotationContexts);
}
Receiver receiver = methodDeclaration.receiver;
if (receiver != null && (receiver.type.bits & ASTNode.HasTypeAnnotations) != 0) {
receiver.type.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_RECEIVER, allTypeAnnotationContexts);
}
}
Annotation[] annotations = methodDeclaration.annotations;
if (annotations != null && !methodDeclaration.isClinit() && (methodDeclaration.isConstructor() || binding.returnType.id != T_void)) {
methodDeclaration.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_RETURN, allTypeAnnotationContexts);
}
if (!methodDeclaration.isConstructor() && !methodDeclaration.isClinit() && binding.returnType.id != T_void) {
MethodDeclaration declaration = (MethodDeclaration) methodDeclaration;
TypeReference typeReference = declaration.returnType;
if ((typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
typeReference.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_RETURN, allTypeAnnotationContexts);
}
}
TypeReference[] thrownExceptions = methodDeclaration.thrownExceptions;
if (thrownExceptions != null) {
for (int i = 0, max = thrownExceptions.length; i < max; i++) {
TypeReference thrownException = thrownExceptions[i];
thrownException.getAllAnnotationContexts(AnnotationTargetTypeConstants.THROWS, i, allTypeAnnotationContexts);
}
}
TypeParameter[] typeParameters = methodDeclaration.typeParameters();
if (typeParameters != null) {
for (int i = 0, max = typeParameters.length; i < max; i++) {
TypeParameter typeParameter = typeParameters[i];
if ((typeParameter.bits & ASTNode.HasTypeAnnotations) != 0) {
typeParameter.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER, i, allTypeAnnotationContexts);