コード例 #1
0
  @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);
        }
      }
    }
  }
コード例 #2
0
 private void validateParameter(
     ASTParameter parameter, ASTBase containingAST, ASTType containingType) {
   for (ASTAnnotation paramAnnotation : parameter.getAnnotations()) {
     validateAnnotation(
         paramAnnotation,
         parameter,
         parameter.getAnnotations(),
         containingAST.getAnnotations(),
         containingType.getAnnotations());
   }
 }
コード例 #3
0
 @Override
 public void analyzeField(
     InjectionNode injectionNode,
     ASTType concreteType,
     ASTField astField,
     AnalysisContext context) {
   for (ASTAnnotation annotation : astField.getAnnotations()) {
     validateAnnotation(
         annotation, astField, astField.getAnnotations(), concreteType.getAnnotations());
   }
 }
コード例 #4
0
  @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);
      }
    }
  }