On Feb 25, 2014, at 3:13 AM, Ali Ebrahimi <ali.ebrahimi1...@gmail.com> wrote:

> I know, this is too late, but I want to share my suggestion:
> 
> public <T extends AccessibleObject&AnnotatedElement> T reflectAs(Class<? 
> super T> expected, MethodHandles.Lookup lookup)

Isn't this the same as 

public <T extends AccessibleObject> T reflectAs...

?

I think we considered AccessibleObject but rejected it as not buying anything 
significant compared with Member which is an interface.

Perhaps 

public <T extends Member & AnnotatedElement> T reflectAs...

with both interfaces, would have been slightly better.

As the API is written (and yes it is too late to change) I don't think there 
are any use cases (at least with ground types) which require an extra cast.

Thank you for looking at it.

— John
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to