Skip to content

Commit

Permalink
Fix some docs typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Nov 9, 2021
1 parent 8881385 commit 5c85df7
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
*
* <p>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
* <p>This method is thread safe: Multiple threads may call it concurrently, and will all receive the same
* executor.
*
* @return The current {@link ExecutorService executor}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* <p>This class is responsible for only the first part, the class hierarchy data hydration.
*
* <p>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.
*
* <p>Use {@link HydrationManager} to handle the orchestration of all of the parts of hydration.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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}.
*
* <p>Only a single mapping set listener mayh be registered at a time, calling this method multiple times will
* <p>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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public boolean isSuccess() {
*
* <p>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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* {@link HypoContext}.
*
* <p>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 {

Expand All @@ -47,11 +47,11 @@ public interface ChangeContributor {
* <p>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.
*
* <p>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.
* <p>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.
*
* <p>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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
*
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private HypoModelUtil() {}
* exception will be thrown - in reality this method never returns.
*
* <p>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:
*
* <pre>
* try {
Expand All @@ -85,8 +85,9 @@ private HypoModelUtil() {}
* }
* </pre>
*
* <p>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.
* <p>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 <X> Generic hack to allow this method to trick the Java compiler into allowing this.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public interface ClassData extends HypoData {

/**
* Set whether this class data was loaded by the
* {@link ClassDataProvider#setContextClassProvider(boolean)} context provider}.
* {@link ClassDataProvider#setContextClassProvider(boolean)} context provider.
*
* @param contextClass {@code true} if this class data was loaded by the context provider.
* @see ClassDataProvider#setContextClassProvider(boolean)
Expand Down Expand Up @@ -235,7 +235,7 @@ default boolean doesExtend(final @NotNull ClassData that) {

/**
* Return {@code true} if this class data implements the given class data. This method walks up the
* {@link #interfaces()} ()} chain, it does not check super classes.
* {@link #interfaces()} chain, it does not check super classes.
*
* @param that The class data to check if this class data implements it.
* @return {@code true} if this class data implements the given class data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public abstract class LazyConstructorData extends AbstractConstructorData {
*
* @return This constructor's descriptor.
*/

public abstract @NotNull MethodDescriptor computeDescriptor();

private final @NotNull LazyValue<MethodDescriptor, ?> descriptor = LazyValue.of(this::computeDescriptor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ default boolean isConstructor() {
* with this method, only the LVT index. For positional index, use {@link #param(int)}.
*
* @param i The LVT index of the parameter to find.
* @return The parameter at the LVT index given, or {@code null} if no paramter could be found at the given LVT
* @return The parameter at the LVT index given, or {@code null} if no parameter could be found at the given LVT
* index.
* @see #param(int)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static int parseType(final @Nullable JvmType @NotNull [] ref, final @Not
* is an array of length 1 - there aren't any validation checks here as this is a private method.
*
* This method also returns the index _before_ the next index. So each of the single-character types simply
* return return `index` instead of `index + 1`. This is intentional for 2 reasons:
* return `index` instead of `index + 1`. This is intentional for 2 reasons:
*
* 1. The calling method, `parseString`, is doing range checks on the `desc` string. If the character just
* parsed is the final character in the string we don't want to overrun that on accident.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void asInternalName(final @NotNull StringBuilder sb) {
* type character.
*
* @param c The character to match to a primitive type.
* @return The primitive type associated with the given chatacter.
* @return The primitive type associated with the given character.
* @throws IllegalStateException If the given character does not match an internal JVM primitive type character.
* @see #asInternalName()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public abstract class TestScenarioBase {
public abstract @NotNull Env env();

/**
* Whether or not the JDK should be included as a context provider in the {@link HypoContext}. By default this is
* Whether the JDK should be included as a context provider in the {@link HypoContext}. By default, this is
* {@code false} as it's usually not needed. Including the JDK in the context may slow down the hydration process.
*
* @return {@code true} if the JDK should be included as a context provider.
Expand Down

0 comments on commit 5c85df7

Please sign in to comment.