public final class ElementOpen extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ElementOpen.Location
Represents the location of an element.
|
Modifier and Type | Method and Description |
---|---|
static CompletableFuture<ElementOpen.Location> |
getLocation(ClasspathInfo cpInfo,
ElementHandle<? extends Element> el,
String resourceName)
Gets location of the
Element corresponding to the given ElementHandle . |
static CompletableFuture<ElementOpen.Location> |
getLocation(ClasspathInfo cpInfo,
ElementHandle<? extends Element> el,
String resourceName,
String... names)
Gets location of the
Element corresponding to the given ElementHandle . |
static boolean |
open(ClasspathInfo cpInfo,
Element el)
Opens given
Element . |
static boolean |
open(ClasspathInfo cpInfo,
ElementHandle<? extends Element> el)
Opens
Element corresponding to the given ElementHandle . |
static boolean |
open(ClasspathInfo cpInfo,
ElementHandle<? extends Element> el,
String... names)
Opens
Element corresponding to the given ElementHandle . |
static boolean |
open(FileObject toSearch,
ElementHandle<? extends Element> toOpen)
Opens given
Element . |
static boolean |
open(FileObject toSearch,
TreePathHandle toOpen)
Opens given
TreePathHandle . |
public static boolean open(ClasspathInfo cpInfo, ElementHandle<? extends Element> el)
Element
corresponding to the given ElementHandle
.cpInfo
- ClasspathInfo which should be used for the searchel
- declaration to openpublic static boolean open(ClasspathInfo cpInfo, ElementHandle<? extends Element> el, String... names)
Element
corresponding to the given ElementHandle
.cpInfo
- ClasspathInfo which should be used for the searchel
- declaration to opennames
- suggested names for the file to search forpublic static boolean open(ClasspathInfo cpInfo, Element el)
Element
.cpInfo
- ClasspathInfo which should be used for the searchel
- declaration to openpublic static boolean open(@NonNull FileObject toSearch, @NonNull ElementHandle<? extends Element> toOpen)
Element
.toSearch
- fileobject whose ClasspathInfo
will be usedtoOpen
- ElementHandle
of the element which should be opened.public static boolean open(@NonNull FileObject toSearch, @NonNull TreePathHandle toOpen)
TreePathHandle
.toSearch
- the FileObject
used to resolve the TreePathHandle
intoOpen
- TreePathHandle
of the Tree
which should be opened.public static CompletableFuture<ElementOpen.Location> getLocation(ClasspathInfo cpInfo, ElementHandle<? extends Element> el, String resourceName)
Element
corresponding to the given ElementHandle
.cpInfo
- ClasspathInfo which should be used for the searchel
- ElementHandle to searchresourceName
- optional resource name to searchpublic static CompletableFuture<ElementOpen.Location> getLocation(ClasspathInfo cpInfo, ElementHandle<? extends Element> el, String resourceName, String... names)
Element
corresponding to the given ElementHandle
.cpInfo
- ClasspathInfo which should be used for the searchel
- ElementHandle to searchresourceName
- optional resource name to searchnames
- suggested names of the source file to seek for