return new TreePathHandle(new ElementDelegate(ElementHandle.create(element), u, qualName, info.getClasspathInfo()));
/**Constructs a <code>TreePathHandle</code> that corresponds to the given <code>ElementHandle</code>. * * @param handle an <code>ElementHandle</code> for which the <code>TreePathHandle</code> should be constructed * @param cpInfo a classpath which is supposed to contain the element described by given the <code>ElementHandle</code> * @return a newly constructed <code>TreePathHandle</code> * @since 0.79 */ public static @NonNull TreePathHandle from(@NonNull ElementHandle<?> handle, @NonNull ClasspathInfo cpInfo) { Parameters.notNull("handle", handle); Parameters.notNull("cpInfo", cpInfo); return new TreePathHandle(new ElementDelegate(handle, null, null, cpInfo)); }
return new TreePathHandle(new EmptyDelegate(url, treePath.getLeaf().getKind())); int index = listChildren(treePath.getParentPath().getLeaf()).indexOf(treePath.getLeaf()); assert index != (-1); return new TreePathHandle(new CountingDelegate(TreePathHandle.create(treePath.getParentPath(), info), index, treePath.getLeaf().getKind())); correspondingElementHandle = createHandle(correspondingElement); return new TreePathHandle(new TreeDelegate(pos, new TreeDelegate.KindPath(treePath), file, elementHandle, correspondingElementHandle));