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 int
getPriority()
Get the prioritydefault java.net.URL[]
getURLs(java.lang.ClassLoader classLoader)
Get the Class-Path URLs from the specifiedClassLoader
default boolean
initializeLoaders(java.lang.ClassLoader classLoader)
Initialize the loaders of URL Class-Path fromURLClassLoader
boolean
removeURL(java.lang.ClassLoader classLoader, java.net.URL url)
Remove the Class-PathURL
from the specifiedClassLoader
boolean
supports()
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:
true
if initialized, otherwisefalse
-
removeURL
boolean removeURL(@Nullable java.lang.ClassLoader classLoader, @Nullable java.net.URL url)
Remove the Class-PathURL
from the specifiedClassLoader
- Parameters:
classLoader
- the specifiedClassLoader
url
- the Class-PathURL
- Returns:
- if removed, return
true
, otherwisefalse
-
getPriority
default int getPriority()
Get the priority- Specified by:
getPriority
in interfacePrioritized
- Returns:
- the default value is
Prioritized.MIN_PRIORITY
-
-