Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对使用 Eclipse JDT 创建CAPTURE绑定很感兴趣。
我已经阅读了几个捕获转换教程,但是当我复制粘贴示例代码片段时,我永远无法在抽象语法树中找到捕获转换绑定(使用插件 ASTView 来可视化 AST)。
如何实现?
Deepak Azad @ Eclipse 论坛提供的示例:
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 } }