Class NamedImportScope
java.lang.Object
io.github.potjerodekool.nabu.resolve.scope.ImportScope
io.github.potjerodekool.nabu.resolve.scope.NamedImportScope
- All Implemented Interfaces:
Scope
Named import scope.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCollection<? extends Element> elements()resolveByName(String name, Predicate<Element> filter) resolveType(String name) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.potjerodekool.nabu.resolve.scope.Scope
findModuleElement, getCompilationUnit, getCurrentClass, getCurrentElement, getCurrentMethod, getGlobalScope, getPackageElement, getParent, locals, resolve, setPackageElement
-
Constructor Details
-
NamedImportScope
public NamedImportScope()
-
-
Method Details
-
define
- Parameters:
element- An element. Add an element to the scope.
-
resolve
- Parameters:
name- An element name.- Returns:
- Returns the resolved element with the given name or null if not found.
-
resolveType
- Parameters:
name- An element name.- Returns:
- Return the resolved type or null if not found.
-
resolveByName
- Parameters:
name- An element name.filter- A filter to use.- Returns:
- Returns an iterable with the resolved elements.
-
elements
- Returns:
- Returns a collection of elements defined in this scope.
-