コード例 #1
0
  @Override
  public void visit(Tree.SpecifiedArgument argument) {
    if (annotationConstructor != null && this.elements == null) {
      AnnotationArgument aa = new AnnotationArgument();
      aa.setParameter(argument.getParameter());
      push(aa);
      argument.getSpecifierExpression().visit(this);

      aa.setTerm(this.term);
      instantiation.getAnnotationArguments().add(aa);
      this.term = null;
      pop();
    } else {
      super.visit(argument);
    }
  }
コード例 #2
0
 @Override
 public void visit(Tree.SpecifiedArgument that) {
   ProducedType ort = requiredType;
   Parameter p = that.getParameter();
   if (p != null) {
     if (namedArgTarget != null) {
       requiredType = namedArgTarget.getTypedParameter(p).getType();
     } else {
       requiredType = p.getType();
     }
   }
   super.visit(that);
   requiredType = ort;
 }