JavaHT ElementHandle

ElementHandle

As was mentioned above, it is not possible to hold Elements, TypeMirrors and Trees and to compare instances got from different javac instances.

To solve this limitation, ElementHandle was introduced. The ElementHandle allows to pass an Element from one javac instance to another. In the first instance of javac, create the handle using ElementHandle.create(Element) method. Keep the resulting handle, but do not hold the element itself. In the other instance of javac, use ElementHandle.resolve(CompilationInfo) method to resolve the ElementHandle back to the Element.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo