equal
deleted
inserted
replaced
628 } else { |
628 } else { |
629 return new Attribute.Error(result.getOriginalType()); |
629 return new Attribute.Error(result.getOriginalType()); |
630 } |
630 } |
631 } |
631 } |
632 |
632 |
|
633 // Class literals look like field accesses of a field named class |
|
634 // at the tree level |
|
635 if (TreeInfo.name(tree) != names._class) { |
|
636 log.error(tree.pos(), Errors.AnnotationValueMustBeClassLiteral); |
|
637 return new Attribute.Error(syms.errType); |
|
638 } |
|
639 |
633 return new Attribute.Class(types, |
640 return new Attribute.Class(types, |
634 (((JCFieldAccess) tree).selected).type); |
641 (((JCFieldAccess) tree).selected).type); |
635 } |
642 } |
636 |
643 |
637 private Attribute getAnnotationPrimitiveValue(Type expectedElementType, JCExpression tree, Env<AttrContext> env) { |
644 private Attribute getAnnotationPrimitiveValue(Type expectedElementType, JCExpression tree, Env<AttrContext> env) { |