T
- The type of the elements to be abstracted.public interface SimpleAbstracting<T extends Resolver> extends Abstracting<T>, Resolver
Resolver.resolve(String)
and Resolver.getResolvableNames()
methods, by calling the same methods of the abstracted nodes. This interface isn't used for type-checks anywhere, its
existence is merely to simplify writing code for Abstracting
implementations.Modifier and Type | Method and Description |
---|---|
default java.util.Set<java.lang.String> |
getResolvableNames()
Returns a set of strings, indicating all names which can be resolved by this resolver.
|
default java.util.Set<Resolver> |
resolve(java.lang.String name)
Resolve the given name to a set of resolvers.
|
abstracted, getAbstractionReason, setAbstractionReason
canResolve
default java.util.Set<Resolver> resolve(java.lang.String name)
Resolver
Resolver.canResolve(String)
for the same argument
returns true, the set may be empty, but it will never be null or contain null elements. Note that however, if that
method returns false, there are no guarantees about the returned set in any way.default java.util.Set<java.lang.String> getResolvableNames()
Resolver
Resolver.canResolve(String)
. However, the opposite does not need to hold: Just
because Resolver.canResolve(String)
returns true for some name, does not mean that name is contained in the
returned set, as sometimes listing all possibly resolvable names is not feasible as it may be infinite.getResolvableNames
in interface Resolver