Package io.microsphere.classloading
Interface URLClassPathHandle
-
- All Superinterfaces:
java.lang.Comparable<Prioritized>,Prioritized
- All Known Implementing Classes:
AbstractURLClassPathHandle,ClassicURLClassPathHandle,ModernURLClassPathHandle,NoOpURLClassPathHandle,ServiceLoadingURLClassPathHandle
public interface URLClassPathHandle extends Prioritized
The handle interface for URL Class-Path- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
ClassicURLClassPathHandle,ModernURLClassPathHandle
-
-
Field Summary
-
Fields inherited from interface io.microsphere.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetPriority()Get the prioritydefault java.net.URL[]getURLs(java.lang.ClassLoader classLoader)Get the Class-Path URLs from the specifiedClassLoaderdefault booleaninitializeLoaders(java.lang.ClassLoader classLoader)Initialize the loaders of URL Class-Path fromURLClassLoaderbooleanremoveURL(java.lang.ClassLoader classLoader, java.net.URL url)Remove the Class-PathURLfrom the specifiedClassLoaderbooleansupports()Supports or not-
Methods inherited from interface io.microsphere.lang.Prioritized
compareTo
-
-
-
-
Method Detail
-
supports
boolean supports()
Supports or not- Returns:
- if supports, return
true, otherwisefalse
-
getURLs
@Nonnull default java.net.URL[] getURLs(@Nullable java.lang.ClassLoader classLoader)
Get the Class-Path URLs from the specifiedClassLoader- Parameters:
classLoader- the specifiedClassLoader- Returns:
- the non-null array of
URLs
-
initializeLoaders
default boolean initializeLoaders(@Nullable java.lang.ClassLoader classLoader)
Initialize the loaders of URL Class-Path fromURLClassLoader- Parameters:
classLoader-ClassLoader- Returns:
trueif initialized, otherwisefalse
-
removeURL
boolean removeURL(@Nullable java.lang.ClassLoader classLoader, @Nullable java.net.URL url)
Remove the Class-PathURLfrom the specifiedClassLoader- Parameters:
classLoader- the specifiedClassLoaderurl- the Class-PathURL- Returns:
- if removed, return
true, otherwisefalse
-
getPriority
default int getPriority()
Get the priority- Specified by:
getPriorityin interfacePrioritized- Returns:
- the default value is
Prioritized.MIN_PRIORITY
-
-