Enum Class IModuleAwareNameEnvironment.LookupStrategy
java.lang.Object
java.lang.Enum<IModuleAwareNameEnvironment.LookupStrategy>
org.aspectj.org.eclipse.jdt.internal.compiler.env.IModuleAwareNameEnvironment.LookupStrategy
- All Implemented Interfaces:
Serializable
,Comparable<IModuleAwareNameEnvironment.LookupStrategy>
,java.lang.constant.Constable
- Enclosing interface:
- IModuleAwareNameEnvironment
public static enum IModuleAwareNameEnvironment.LookupStrategy
extends Enum<IModuleAwareNameEnvironment.LookupStrategy>
Strategies for searching types & packages in classpath locations & modules.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionget(char[] moduleName)
Get the lookup strategy corresponding to the given module name.static String
getStringName(char[] moduleName)
If 'moduleName' is none of the special names (ANY, ANY_NAMED, UNNAMED) return the string converted name, elsenull
.<T> boolean
Test whether the given element matches this lookup strategy.abstract <T> boolean
matchesWithName(T elem, Predicate<T> isNamed, Predicate<T> nameMatcher)
Test whether the given element matches this lookup strategy.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Named
Search a specific named module only. -
AnyNamed
Search all named modules. -
Any
Search all locations, module or otherwise. -
Unnamed
Search only the unnamed module.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
matchesWithName
public abstract <T> boolean matchesWithName(T elem, Predicate<T> isNamed, Predicate<T> nameMatcher)Test whether the given element matches this lookup strategy.- Parameters:
elem
- location being testsisNamed
- predicate to determine if 'elem' represents a named modulenameMatcher
- predicate to test if 'elem' matches the expected module name- Returns:
- true iff the given element matches this lookup strategy.
-
matches
Test whether the given element matches this lookup strategy.- Parameters:
elem
- location being testsisNamed
- predicate to determine if 'elem' represents a named module- Returns:
- true iff the given element matches this lookup strategy.
-
get
Get the lookup strategy corresponding to the given module name. -
getStringName
If 'moduleName' is none of the special names (ANY, ANY_NAMED, UNNAMED) return the string converted name, elsenull
.
-