java.lang.Object
iu.type.TypeSpi
- All Implemented Interfaces:
IuTypeSpi
Service provider implementation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateComponent
(ClassLoader parent, ModuleLayer parentLayer, Consumer<ModuleLayer.Controller> controllerCallback, InputStream componentArchiveSource, InputStream... providedDependencyArchiveSources) ImplementsIuComponent.of(InputStream, InputStream...)
.IuType
<?, ?> resolveType
(Type type) Resolves anIuType
instance for a generic type.scanComponentEntry
(ClassLoader classLoader, ModuleLayer moduleLayer, Path pathEntry) Decorates a path entry in a loaded class environment as acomponent
.
-
Constructor Details
-
TypeSpi
public TypeSpi()Default constructor.
-
-
Method Details
-
resolveType
Description copied from interface:IuTypeSpi
Resolves anIuType
instance for a generic type.- Specified by:
resolveType
in interfaceIuTypeSpi
- Parameters:
type
- Type- Returns:
- Type introspection facade
- See Also:
-
createComponent
public IuComponent createComponent(ClassLoader parent, ModuleLayer parentLayer, Consumer<ModuleLayer.Controller> controllerCallback, InputStream componentArchiveSource, InputStream... providedDependencyArchiveSources) Description copied from interface:IuTypeSpi
ImplementsIuComponent.of(InputStream, InputStream...)
.- Specified by:
createComponent
in interfaceIuTypeSpi
- Parameters:
parent
-ClassLoader
for parent delegationparentLayer
-ModuleLayer
to extendcontrollerCallback
- receives a reference to theModuleLayer.Controller
for the components's module layercomponentArchiveSource
- component archiveprovidedDependencyArchiveSources
- provided dependency archives- Returns:
IuComponent
instance- See Also:
-
scanComponentEntry
public IuComponent scanComponentEntry(ClassLoader classLoader, ModuleLayer moduleLayer, Path pathEntry) throws IOException, ClassNotFoundException Description copied from interface:IuTypeSpi
Decorates a path entry in a loaded class environment as acomponent
.- Specified by:
scanComponentEntry
in interfaceIuTypeSpi
- Parameters:
classLoader
-ClassLoader
; must includepathEntry
on its class or module path.moduleLayer
-ModuleLayer
pathEntry
- Singlepath entry
representing ajar file
or folder containing resources loaded byclassLoader
- Returns:
IuComponent
decorated view of the path entry relative to the class loader.- Throws:
IOException
- if an I/O error occurs while scanning the path for resources.ClassNotFoundException
- if any class discovered on the path could not be loaded usingclassLoader
-