equal
deleted
inserted
replaced
482 |
482 |
483 // Resolve element to MethodSym |
483 // Resolve element to MethodSym |
484 JCIdent left = (JCIdent)assign.lhs; |
484 JCIdent left = (JCIdent)assign.lhs; |
485 Symbol method = resolve.resolveQualifiedMethod(elidedValue ? assign.rhs.pos() : left.pos(), |
485 Symbol method = resolve.resolveQualifiedMethod(elidedValue ? assign.rhs.pos() : left.pos(), |
486 env, thisAnnotationType, |
486 env, thisAnnotationType, |
487 left.name, List.<Type>nil(), null); |
487 left.name, List.nil(), null); |
488 left.sym = method; |
488 left.sym = method; |
489 left.type = method.type; |
489 left.type = method.type; |
490 if (method.owner != thisAnnotationType.tsym && !badAnnotation) |
490 if (method.owner != thisAnnotationType.tsym && !badAnnotation) |
491 log.error(left.pos(), "no.annotation.member", left.name, thisAnnotationType); |
491 log.error(left.pos(), "no.annotation.member", left.name, thisAnnotationType); |
492 Type resultType = method.type.getReturnType(); |
492 Type resultType = method.type.getReturnType(); |
624 |
624 |
625 private Attribute getAnnotationArrayValue(Type expectedElementType, JCExpression tree, Env<AttrContext> env) { |
625 private Attribute getAnnotationArrayValue(Type expectedElementType, JCExpression tree, Env<AttrContext> env) { |
626 // Special case, implicit array |
626 // Special case, implicit array |
627 if (!tree.hasTag(NEWARRAY)) { |
627 if (!tree.hasTag(NEWARRAY)) { |
628 tree = make.at(tree.pos). |
628 tree = make.at(tree.pos). |
629 NewArray(null, List.<JCExpression>nil(), List.of(tree)); |
629 NewArray(null, List.nil(), List.of(tree)); |
630 } |
630 } |
631 |
631 |
632 JCNewArray na = (JCNewArray)tree; |
632 JCNewArray na = (JCNewArray)tree; |
633 if (na.elemtype != null) { |
633 if (na.elemtype != null) { |
634 log.error(na.elemtype.pos(), "new.not.allowed.in.annotation"); |
634 log.error(na.elemtype.pos(), "new.not.allowed.in.annotation"); |