@Override public void analyzeType(InjectionNode injectionNode, ASTType astType, AnalysisContext context) { for (ASTAnnotation annotation : astType.getAnnotations()) { validateAnnotation(annotation, astType, astType.getAnnotations()); } for (ASTConstructor astConstructor : astType.getConstructors()) { for (ASTAnnotation annotation : astConstructor.getAnnotations()) { validateAnnotation( annotation, astConstructor, astConstructor.getAnnotations(), astType.getAnnotations()); for (ASTParameter astParameter : astConstructor.getParameters()) { validateParameter(astParameter, astConstructor, astType); } } } }
private void validateParameter( ASTParameter parameter, ASTBase containingAST, ASTType containingType) { for (ASTAnnotation paramAnnotation : parameter.getAnnotations()) { validateAnnotation( paramAnnotation, parameter, parameter.getAnnotations(), containingAST.getAnnotations(), containingType.getAnnotations()); } }
@Override public void analyzeField( InjectionNode injectionNode, ASTType concreteType, ASTField astField, AnalysisContext context) { for (ASTAnnotation annotation : astField.getAnnotations()) { validateAnnotation( annotation, astField, astField.getAnnotations(), concreteType.getAnnotations()); } }
@Override public void analyzeMethod( InjectionNode injectionNode, ASTType concreteType, ASTMethod astMethod, AnalysisContext context) { for (ASTAnnotation annotation : astMethod.getAnnotations()) { validateAnnotation( annotation, astMethod, astMethod.getAnnotations(), concreteType.getAnnotations()); for (ASTParameter astParameter : astMethod.getParameters()) { validateParameter(astParameter, astMethod, concreteType); } } }