From 5c85df75476c322b17364b730b661c127eed255d Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Mon, 8 Nov 2021 22:26:13 -0800 Subject: [PATCH] Fix some docs typos --- .../denwav/hypo/asm/hydrate/SuperConstructorHydrator.java | 2 +- .../src/main/java/dev/denwav/hypo/core/HypoContext.java | 3 +-- .../java/dev/denwav/hypo/hydrate/ClassDataHydrator.java | 2 +- .../main/java/dev/denwav/hypo/mappings/ChangeChain.java | 8 ++++---- .../java/dev/denwav/hypo/mappings/ChangeRegistry.java | 6 ++---- .../main/java/dev/denwav/hypo/mappings/MergeResult.java | 2 +- .../mappings/changes/CopyConstructorMappingChange.java | 2 +- .../denwav/hypo/mappings/changes/RemoveMappingChange.java | 2 +- .../hypo/mappings/contributors/ChangeContributor.java | 8 ++++---- .../hypo/mappings/contributors/CopyMappingsDown.java | 6 +++--- .../java/dev/denwav/hypo/model/ClassDataProvider.java | 4 ++-- .../main/java/dev/denwav/hypo/model/HypoModelUtil.java | 7 ++++--- .../main/java/dev/denwav/hypo/model/data/ClassData.java | 4 ++-- .../dev/denwav/hypo/model/data/LazyConstructorData.java | 1 - .../main/java/dev/denwav/hypo/model/data/MethodData.java | 2 +- .../java/dev/denwav/hypo/model/data/MethodDescriptor.java | 2 +- .../dev/denwav/hypo/model/data/types/PrimitiveType.java | 2 +- .../dev/denwav/hypo/test/framework/TestScenarioBase.java | 2 +- 18 files changed, 31 insertions(+), 34 deletions(-) diff --git a/hypo-asm/hypo-asm-hydrate/src/main/java/dev/denwav/hypo/asm/hydrate/SuperConstructorHydrator.java b/hypo-asm/hypo-asm-hydrate/src/main/java/dev/denwav/hypo/asm/hydrate/SuperConstructorHydrator.java index 17686f2..b3b9322 100644 --- a/hypo-asm/hypo-asm-hydrate/src/main/java/dev/denwav/hypo/asm/hydrate/SuperConstructorHydrator.java +++ b/hypo-asm/hypo-asm-hydrate/src/main/java/dev/denwav/hypo/asm/hydrate/SuperConstructorHydrator.java @@ -151,7 +151,7 @@ private void hydrate0(final @NotNull AsmConstructorData data) throws IOException varArgument = (Variable) arg; } else if (arg instanceof MethodCall) { // We will still match the name if a constructor parameter is the only argument passed to a method - // This could be for example where the sub-class calls a method to transform the input, but it's + // This could be for example where the subclass calls a method to transform the input, but it's // still the same input. For example maybe something like: // // public SomeClass(String s) { diff --git a/hypo-core/src/main/java/dev/denwav/hypo/core/HypoContext.java b/hypo-core/src/main/java/dev/denwav/hypo/core/HypoContext.java index 6814e79..71624a1 100644 --- a/hypo-core/src/main/java/dev/denwav/hypo/core/HypoContext.java +++ b/hypo-core/src/main/java/dev/denwav/hypo/core/HypoContext.java @@ -107,8 +107,7 @@ public final class HypoContext implements AutoCloseable { * executor will be created according to the {@link #getConfig() configuration} and returned. This executor will be * used for all subsequent requests until this context is {@link #close() closed}. * - *
This method is thread safe: Multiple threads may call it concurrently and they will all receive the same - * executor. Concurrent accesses to this method while the executor is being created will all receive the same + *
This method is thread safe: Multiple threads may call it concurrently, and will all receive the same * executor. * * @return The current {@link ExecutorService executor}. diff --git a/hypo-hydrate/src/main/java/dev/denwav/hypo/hydrate/ClassDataHydrator.java b/hypo-hydrate/src/main/java/dev/denwav/hypo/hydrate/ClassDataHydrator.java index ad6a93c..c858be9 100644 --- a/hypo-hydrate/src/main/java/dev/denwav/hypo/hydrate/ClassDataHydrator.java +++ b/hypo-hydrate/src/main/java/dev/denwav/hypo/hydrate/ClassDataHydrator.java @@ -36,7 +36,7 @@ *
This class is responsible for only the first part, the class hierarchy data hydration. * *
The default implementation of this interface is {@link DefaultClassDataHydrator}, and it is implemented using only - * the base {@link ClassData ClassData} APIs so it should be okay for most cases. + * the base {@link ClassData ClassData} APIs, so it should be okay for most cases. * *
Use {@link HydrationManager} to handle the orchestration of all of the parts of hydration. */ diff --git a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/ChangeChain.java b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/ChangeChain.java index a33d705..f281ab8 100644 --- a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/ChangeChain.java +++ b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/ChangeChain.java @@ -65,7 +65,7 @@ private ChangeChain() {} } /** - * Add a link to this chain with the list of {@link ChangeContributor change contributors} to run in this link. + * Add a link to this chain with the list of {@link ChangeContributor change contributors} to run in the link. * * @param changes The list of contributors to run for this link. * @return {@code this} for chaining. @@ -77,7 +77,7 @@ private ChangeChain() {} } /** - * Add a link to this chain with a single {@link ChangeContributor change contributor} to run in this link.. + * Add a link to this chain with a single {@link ChangeContributor change contributor} to run in the link. * * @param change The contributor to run for this link. * @return {@code this} for chaining. @@ -89,7 +89,7 @@ private ChangeChain() {} } /** - * Add a link to this chain with the list of {@link ChangeContributor change contributors} to run in this link. + * Add a link to this chain with the list of {@link ChangeContributor change contributors} to run in the link. * * @param changes The contributors to run for this link. * @return {@code this} for chaining. @@ -121,7 +121,7 @@ private ChangeChain() {} /** * Add a listener which will be called after the changes in each link have been applied to the {@link MappingSet}. * - *
Only a single mapping set listener mayh be registered at a time, calling this method multiple times will + *
Only a single mapping set listener may be registered at a time, calling this method multiple times will * overwrite the previous setting. * * @param listener The listener to run after the {@link MappingSet} for each link has been modified. diff --git a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/ChangeRegistry.java b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/ChangeRegistry.java index c752f0e..afb575f 100644 --- a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/ChangeRegistry.java +++ b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/ChangeRegistry.java @@ -82,13 +82,11 @@ public void submitChange(final @NotNull ClassMappingsChange change) { } /** - * For use by {@link MappingsCompletionManager} to allow for better error messages when mappings changes conflict + * For use by {@link MappingsCompletionManager} to allow for better error messages when mapping changes conflict * with each other. If this method is called before {@link #applyChanges(MappingSet)} then the name give here will * be included in the error message as the change contributor responsible for the conflicting changes. * - * @param currentContributorName The name of the - * {@link ChangeContributor ChangeContributor} - * currently running. + * @param currentContributorName The name of the currently running {@link ChangeContributor ChangeContributor} */ public void setCurrentContributorName(final @Nullable String currentContributorName) { this.currentContributorName = currentContributorName; diff --git a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/MergeResult.java b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/MergeResult.java index 1a17dc8..e4695a3 100644 --- a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/MergeResult.java +++ b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/MergeResult.java @@ -110,7 +110,7 @@ public boolean isSuccess() { * *
This method will always return the opposite of {@link #isSuccess()}. * - * @return {@code true} if this merge result respresents a failed merge. + * @return {@code true} if this merge result represents a failed merge. */ public boolean isFailure() { return !this.isSuccess(); diff --git a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/changes/CopyConstructorMappingChange.java b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/changes/CopyConstructorMappingChange.java index b100ec2..00f6e5a 100644 --- a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/changes/CopyConstructorMappingChange.java +++ b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/changes/CopyConstructorMappingChange.java @@ -56,7 +56,7 @@ private CopyConstructorMappingChange( * Create a new instance of {@link CopyConstructorMappingChange}. * * @param target The {@link MemberReference} this change targets. - * @param superMapping The {@link MethodMapping} of the super constructor to copy the paramters from. + * @param superMapping The {@link MethodMapping} of the super constructor to copy the parameters from. * @return A new instance of {@link CopyConstructorMappingChange}. */ @Contract(value = "_, _ -> new", pure = true) diff --git a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/changes/RemoveMappingChange.java b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/changes/RemoveMappingChange.java index a0f6411..b305c22 100644 --- a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/changes/RemoveMappingChange.java +++ b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/changes/RemoveMappingChange.java @@ -35,7 +35,7 @@ import static dev.denwav.hypo.mappings.LorenzUtil.getMethodMapping; /** - * {@link MappingsChange MappingsChange} which removes the a member mapping. + * {@link MappingsChange MappingsChange} which removes a member mapping. */ public class RemoveMappingChange extends AbstractMappingsChange diff --git a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/contributors/ChangeContributor.java b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/contributors/ChangeContributor.java index cce46e9..d2a54d6 100644 --- a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/contributors/ChangeContributor.java +++ b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/contributors/ChangeContributor.java @@ -32,7 +32,7 @@ * {@link HypoContext}. * *
All change contributors must have a {@link #name() name}, which may simply be the class name. This name is for - * error reporting and debuggin purposes only. + * error reporting and debugging purposes only. */ public interface ChangeContributor { @@ -47,11 +47,11 @@ public interface ChangeContributor { *
If {@code classMapping} is {@code null} that means the {@link ClassData} exists in the {@link HypoContext} * without a corresponding {@link ClassMapping} in the mapping set. * - *
Either {@code currentClass} or {@code classMapping} may be {@code null}, but they cannot both but {@code null} - * at the same time. They probably usually both be present. + *
Either {@code currentClass} or {@code classMapping} may be {@code null}, but they cannot both be {@code null} + * at the same time. They will usually both be present. * *
This contributor may submit any number of mappings changes to the {@link ChangeRegistry}, but generally it - * should only submit changes relevent to the current {@link ClassData} and/or {@link ClassMapping} being processed. + * should only submit changes relevant to the current {@link ClassData} and/or {@link ClassMapping} being processed. * * @param currentClass The {@link ClassData} for this mapping, may be {@code null} if the mapping exists without a * corresponding class in the context. diff --git a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/contributors/CopyMappingsDown.java b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/contributors/CopyMappingsDown.java index 245a4ff..3e67fc6 100644 --- a/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/contributors/CopyMappingsDown.java +++ b/hypo-mappings/src/main/java/dev/denwav/hypo/mappings/contributors/CopyMappingsDown.java @@ -49,8 +49,8 @@ public class CopyMappingsDown implements ChangeContributor { private CopyMappingsDown() {} /** - * Create a new instance of {@link CopyMappingsDown}/ - * @return A new instance of {@link CopyMappingsDown}/ + * Create a new instance of {@link CopyMappingsDown}. + * @return A new instance of {@link CopyMappingsDown}. */ @Contract(value = "-> new", pure = true) public static @NotNull CopyMappingsDown create() { @@ -128,7 +128,7 @@ private static void walkConstructor( if (childClassMapping != null) { final MethodMapping childMapping = getMethodMapping(childClassMapping, childConst.name(), childConst.descriptorText()); if (childMapping != null) { - // This constructor has it's own mappings, so don't copy ours + // This constructor has its own mappings, so don't copy ours continue; } } diff --git a/hypo-model/src/main/java/dev/denwav/hypo/model/ClassDataProvider.java b/hypo-model/src/main/java/dev/denwav/hypo/model/ClassDataProvider.java index e2a7f77..399a63d 100644 --- a/hypo-model/src/main/java/dev/denwav/hypo/model/ClassDataProvider.java +++ b/hypo-model/src/main/java/dev/denwav/hypo/model/ClassDataProvider.java @@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable; /** - * The core source of {@link ClassData} objects, retrieved from a given class name, and for enumerating all of the + * The core source of {@link ClassData} objects, retrieved from a given class name, and for enumerating all the * classes available in the set. This interface does not specify where the class file data is coming from, or even what * format they are in - only two things are needed to implement this interface: * @@ -152,7 +152,7 @@ public interface ClassDataProvider extends AutoCloseable { } /** - * Returns an {@link Iterable} which will iterate over all classes available in this provider. By default this + * Returns an {@link Iterable} which will iterate over all classes available in this provider. By default, this * method simply calls {@link #stream()} and returns that stream's iterator. The default implementation of * {@link #stream()} in {@link AbstractClassDataProvider} is implemented to lazily load {@link ClassData} objects, * however this is not a requirement of implementing this method. diff --git a/hypo-model/src/main/java/dev/denwav/hypo/model/HypoModelUtil.java b/hypo-model/src/main/java/dev/denwav/hypo/model/HypoModelUtil.java index 59e0d0a..7cca894 100644 --- a/hypo-model/src/main/java/dev/denwav/hypo/model/HypoModelUtil.java +++ b/hypo-model/src/main/java/dev/denwav/hypo/model/HypoModelUtil.java @@ -75,7 +75,7 @@ private HypoModelUtil() {} * exception will be thrown - in reality this method never returns. * *
For example, the intended pattern for using this method when the compiler needs to know the code path will not - * continue (such as when initializing variables, etc) is this: + * continue (such as when initializing variables, etc.) is this: * *
* try { @@ -85,8 +85,9 @@ private HypoModelUtil() {} * } ** - *
The actual execution of the code is entirely unchanged whether or not the {@code throw} in the above code - * snippet exists, however including the {@code throw} keyword helps the Java compiler better understand the code. + *
The actual execution of the code is entirely unchanged regardless of whether the {@code throw} in the above
+ * code snippet exists, however including the {@code throw} keyword helps the Java compiler better understand the
+ * code.
*
* @param t The {@link Throwable} to unconditionally re-throw as unchecked.
* @param