53 protected TypeAnnotations(Context context) { |
53 protected TypeAnnotations(Context context) { |
54 context.put(key, this); |
54 context.put(key, this); |
55 } |
55 } |
56 |
56 |
57 public void taFillAndLift(JCClassDecl tree, boolean visitBodies) { |
57 public void taFillAndLift(JCClassDecl tree, boolean visitBodies) { |
58 new TypeAnnotationPositions().scan(tree); |
58 //308 new TypeAnnotationPositions().scan(tree); |
59 new TypeAnnotationLift().scan(tree); |
59 //308 new TypeAnnotationLift().scan(tree); |
60 } |
60 } |
61 |
61 |
62 private static class TypeAnnotationPositions extends TreeScanner { |
62 private static class TypeAnnotationPositions extends TreeScanner { |
63 |
63 |
64 private ListBuffer<JCTree> frames = ListBuffer.lb(); |
64 private ListBuffer<JCTree> frames = ListBuffer.lb(); |
206 break; |
206 break; |
207 default: throw new AssertionError(); |
207 default: throw new AssertionError(); |
208 } |
208 } |
209 return p; |
209 return p; |
210 |
210 |
211 case ANNOTATED_TYPE: { |
211 //308 case ANNOTATED_TYPE: { |
212 List<JCTree> newPath = path.tail; |
212 //308 List<JCTree> newPath = path.tail; |
213 return resolveFrame(newPath.head, newPath.tail.head, |
213 //308 return resolveFrame(newPath.head, newPath.tail.head, |
214 newPath, p); |
214 //308 newPath, p); |
215 } |
215 //308 } |
216 |
216 |
217 case METHOD_INVOCATION: { |
217 case METHOD_INVOCATION: { |
218 JCMethodInvocation invocation = (JCMethodInvocation)frame; |
218 JCMethodInvocation invocation = (JCMethodInvocation)frame; |
219 if (!invocation.typeargs.contains(tree)) |
219 if (!invocation.typeargs.contains(tree)) |
220 throw new AssertionError("{" + tree + "} is not an argument in the invocation: " + invocation); |
220 throw new AssertionError("{" + tree + "} is not an argument in the invocation: " + invocation); |