Skip to content

Commit

Permalink
minor documentation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Steanky committed Aug 2, 2023
1 parent 2d669cc commit f9cd993
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
* "named" dependencies by declaring a single {@link Key} object as a parameter.
*/
public class ModuleDependencyProvider implements DependencyProvider {
@SuppressWarnings({"unchecked"})
private static final Map.Entry<Token<?>, Map<String, Supplier<?>>>[] EMPTY_ENTRY_ARRAY = new Map.Entry[0];

private final DependencyModule module;
private final Map<Token<?>, Map<String, Supplier<?>>> dependencyMap;

Expand All @@ -42,6 +39,7 @@ public class ModuleDependencyProvider implements DependencyProvider {
* @param keyParser the {@link KeyParser} object used to convert strings to keys
* @param module the {@link DependencyModule} object to use
*/
@SuppressWarnings("unchecked")
public ModuleDependencyProvider(final @NotNull KeyParser keyParser, final @NotNull DependencyModule module) {
Objects.requireNonNull(keyParser);
this.module = Objects.requireNonNull(module);
Expand Down Expand Up @@ -123,7 +121,7 @@ public ModuleDependencyProvider(final @NotNull KeyParser keyParser, final @NotNu
}

final Map.Entry<Token<?>, Map<String, Supplier<?>>>[] array = dependencyMap.entrySet()
.toArray(EMPTY_ENTRY_ARRAY);
.toArray(Map.Entry[]::new);
for (int i = 0; i < array.length; i++) {
final Map.Entry<Token<?>, Map<String, Supplier<?>>> entry = array[i];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public final class ElementSearcher {
* @return an unmodifiable set of classes contained in the given package
*/
public static @NotNull @Unmodifiable Set<Class<?>> getElementClassesInPackage(@NotNull String packageName) {
Objects.requireNonNull(packageName, "packageName");
Objects.requireNonNull(packageName);
return Set.copyOf(new Reflections(new ConfigurationBuilder().forPackage(packageName))
.getTypesAnnotatedWith(Model.class));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import java.util.function.Supplier;

/**
* Contains utility methods designed to validate various conditions, usually in a reflection-related context.
* Contains utility methods designed to validate various conditions, usually in a reflection-related context. These
* methods are public for cross-package access within Element, but are not part of the public API and may be changed or
* removed at any time.
*/
@ApiStatus.Internal
public final class Validate {
Expand Down

0 comments on commit f9cd993

Please sign in to comment.