开发者

How to create an AST with a CAPTURE binding?

开发者 https://www.devze.com 2023-01-30 22:28 出处:网络
I am interested in using the Eclipse JDT to create a CAPTURE binding. I\'ve read several capture conversion tutorials, but when I copy-paste sample code snippets, I can never find a capture conversio

I am interested in using the Eclipse JDT to create a CAPTURE binding.

I've read several capture conversion tutorials, but when I copy-paste sample code snippets, I can never find a capture conversion binding in the Abstract Syntax Tree (using the plugin ASTView for visualizing the AS开发者_Go百科T).

How can this be accomplished?


Example provided by Deepak Azad @ Eclipse Forums:

interface Box<T> {
    public T get();
    public void put( T element);
}

class CaptureTest {
    public void rebox( Box<?> box) {
        box.get(); // return type of get() is a capture binding
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号