Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/java/io/smallrye/modules/DelegatingModuleLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public DelegatingModuleLoader(final String name, final ModuleFinder moduleFinder
Assert.checkNotNullParam("delegate", delegate);
}

/**
* {@inheritDoc}
*/
public LoadedModule loadModule(final String moduleName) {
LoadedModule loadedModule = super.loadModule(moduleName);
if (loadedModule != null) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/smallrye/modules/LoadedModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void forEachExportedPackage(Module toModule, Consumer<String> action) {
}

/**
* {@return the optional name of the module}
* {@return the optional name of the module (not {@code null})}
*/
public Optional<String> name() {
if (module != null) {
Expand Down Expand Up @@ -113,14 +113,14 @@ public int hashCode() {
}

/**
* {@return a string representation of this loaded module}
* {@return a string representation of this loaded module (not {@code null})}
*/
public String toString() {
return module != null ? module.toString() : "module⁺ " + moduleClassLoader.moduleName();
}

/**
* {@return a loaded module for the given module}
* {@return a loaded module for the given module (not {@code null})}
*
* @param module the module to encapsulate (must not be {@code null})
*/
Expand All @@ -129,7 +129,7 @@ public static LoadedModule forModule(Module module) {
}

/**
* {@return a loaded module for the given module class loader}
* {@return a loaded module for the given module class loader (not {@code null})}
*
* @param cl the class loader of the module to encapsulate (must not be {@code null})
*/
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/io/smallrye/modules/ModuleClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,28 +141,28 @@ public final String getName() {
}

/**
* {@return the defining module loader of this module}
* {@return the defining module loader of this module (not {@code null})}
*/
public final ModuleLoader moduleLoader() {
return moduleLoader;
}

/**
* {@return the name of this class loader's module}
* {@return the name of this class loader's module (not {@code null})}
*/
public String moduleName() {
return moduleName;
}

/**
* {@return the module loaded by this class loader}
* {@return the module loaded by this class loader (not {@code null})}
*/
public final Module module() {
return linkDefined().module();
}

/**
* {@return the main class of this module, if any (not {@code null})}
* {@return the optional main class of this module (not {@code null})}
*/
public final Optional<Class<?>> mainClass() {
String mainClassName = this.mainClassName;
Expand Down Expand Up @@ -356,7 +356,7 @@ public final Stream<URL> resources(final String name) {
}

/**
* {@return the set of exported package names for this module}
* {@return the set of exported package names for this module (not {@code null})}
*/
public final Set<String> exportedPackages() {
throw new UnsupportedOperationException("Not supported yet.");
Expand Down Expand Up @@ -387,6 +387,9 @@ public static ModuleClassLoader ofThread(Thread thread) {
return thread.getContextClassLoader() instanceof ModuleClassLoader mcl ? mcl : null;
}

/**
* {@inheritDoc}
*/
public String toString() {
return "ModuleClassLoader[" + moduleName + "]";
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/smallrye/modules/ModuleDescriptorLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ public interface ModuleDescriptorLoader {
ModuleDescriptor loadDescriptor(String moduleName, List<ResourceLoader> loaders) throws IOException;

/**
* {@return a module opener which looks for a {@code module-info.class} file, or otherwise constructs an automatic module,
* possibly with no dependencies}
* {@return a module descriptor loader which looks for a {@code module-info.class} file, or otherwise constructs an
* automatic module, possibly with no dependencies (not {@code null})}
*/
static ModuleDescriptorLoader basic() {
return ModuleDescriptorLoader::loadDescriptorBasic;
}

/**
* {@return a module opener which looks for a {@code module-info.class} file, or otherwise constructs an automatic module,
* possibly with no dependencies}
* {@return a module descriptor loader which looks for a {@code module-info.class} file, or otherwise constructs an
* automatic module, possibly with no dependencies (not {@code null})}
*
* @param extraAccesses extra accesses to add (must not be {@code null})
*/
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/smallrye/modules/ModuleFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public interface ModuleFinder extends Closeable {
FoundModule findModule(String name);

/**
* {@return a module finder that first searches this finder, and then the given finder if no module is found}
* {@return a module finder that first searches this finder, and then the given finder if no module is found
* (not {@code null})}
*
* @param other the fallback finder (must not be {@code null})
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/smallrye/modules/ModuleLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public ModuleLoader(final String name) {
}

/**
* {@return the name of this module loader}
* {@return the name of this module loader (not {@code null})}
*/
public String name() {
return name;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/smallrye/modules/ResourceLoaderOpener.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static ResourceLoaderOpener forLoader(ResourceLoader loader) {
}

/**
* {@return an opener that creates a path-based resource loader for the given directory}
* {@return an opener that creates a path-based resource loader for the given directory (not {@code null})}
*
* @param path the directory path (must not be {@code null})
*/
Expand All @@ -45,7 +45,7 @@ static ResourceLoaderOpener forDirectory(Path path) {
}

/**
* {@return an opener that creates a JAR file resource loader for the given path}
* {@return an opener that creates a JAR file resource loader for the given path (not {@code null})}
*
* @param jarPath the JAR file path (must not be {@code null})
*/
Expand All @@ -54,7 +54,7 @@ static ResourceLoaderOpener forJarFile(Path jarPath) {
}

/**
* {@return an opener that creates a JAR file resource loader for the given resource}
* {@return an opener that creates a JAR file resource loader for the given resource (not {@code null})}
*
* @param jarResource the JAR file resource (must not be {@code null})
*/
Expand All @@ -63,7 +63,7 @@ static ResourceLoaderOpener forJarResource(Resource jarResource) {
}

/**
* {@return an opener that creates a URL-based resource loader for the given URL}
* {@return an opener that creates a URL-based resource loader for the given URL (not {@code null})}
*
* @param url the URL (must not be {@code null})
*/
Expand Down
Loading
Loading