Skip to content

Commit

Permalink
Javadoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Jan 21, 2024
1 parent 2918ba0 commit 3f070e5
Show file tree
Hide file tree
Showing 25 changed files with 176 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* Class responsible for mapping Cloud {@link ArgumentParser ArgumentParsers} to Sponge
* {@link CommandTreeNode.Argument CommandTreeNode.Arguments}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class SpongeParserMapper<C> {

Expand Down Expand Up @@ -257,7 +257,7 @@ public void cloudNumberSuggestions(final boolean cloudNumberSuggestions) {
* Builder for mappings from Cloud {@link ArgumentParser ArgumentParsers} to Sponge
* {@link CommandTreeNode.Argument CommandTreeNode.Arguments}
*
* @param <C> sender type
* @param <C> command sender type
* @param <A> parser type
*/
public interface MappingBuilder<C, A extends ArgumentParser<C, ?>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@
* <li>{@code andesite_stairs[waterlogged=true,facing=east]}</li>
* </ul>
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class BlockInputParser<C> implements NodeSource, ArgumentParser.FutureArgumentParser<C, BlockInput>, SuggestionProvider<C> {

/**
* Creates a new {@link BlockInputParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, BlockInput> blockInputParser() {
return ParserDescriptor.of(new BlockInputParser<>(), BlockInput.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@
/**
* An argument for parsing {@link BlockPredicate BlockPredicates}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class BlockPredicateParser<C> implements ArgumentParser.FutureArgumentParser<C, BlockPredicate>,
NodeSource, SuggestionProvider<C> {

/**
* Creates a new {@link BlockPredicateParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, BlockPredicate> blockPredicateParser() {
return ParserDescriptor.of(new BlockPredicateParser<>(), BlockPredicate.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@
/**
* An argument for parsing {@link Component Components} from json formatted text.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class ComponentParser<C> implements ArgumentParser.FutureArgumentParser<C, Component>, NodeSource, SuggestionProvider<C> {

/**
* Creates a new {@link ComponentParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, Component> componentParser() {
return ParserDescriptor.of(new ComponentParser<>(), Component.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@
* Argument for parsing {@link DataContainer DataContainers} from
* <a href="https://minecraft.fandom.com/wiki/NBT_format">SNBT</a> strings.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class DataContainerParser<C> implements ArgumentParser.FutureArgumentParser<C, DataContainer>,
NodeSource, SuggestionProvider<C> {

/**
* Creates a new {@link DataContainerParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, DataContainer> dataContainerParser() {
return ParserDescriptor.of(new DataContainerParser<>(), DataContainer.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,17 @@
* Argument for parsing a {@link Collection} of {@link GameProfile GameProfiles} from a
* {@link Selector}. A successfully parsed result will contain at least one element.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class GameProfileCollectionParser<C> implements NodeSource,
ArgumentParser.FutureArgumentParser<C, GameProfileCollection>, SuggestionProvider<C> {

/**
* Creates a new {@link GameProfileCollectionParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, GameProfileCollection> gameProfileCollectionParser() {
return ParserDescriptor.of(new GameProfileCollectionParser<>(), GameProfileCollection.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,16 @@
/**
* Argument for parsing a single {@link GameProfile} from a {@link Selector}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class GameProfileParser<C> implements ArgumentParser.FutureArgumentParser<C, GameProfile>, NodeSource, SuggestionProvider<C> {

/**
* Creates a new {@link GameProfileParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, GameProfile> gameProfileParser() {
return ParserDescriptor.of(new GameProfileParser<>(), GameProfile.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@
/**
* An argument for parsing {@link ItemStackPredicate ItemStackPredicates}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class ItemStackPredicateParser<C> implements ArgumentParser.FutureArgumentParser<C, ItemStackPredicate>,
NodeSource, SuggestionProvider<C> {

/**
* Creates a new {@link ItemStackPredicateParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, ItemStackPredicate> itemStackPredicateParser() {
return ParserDescriptor.of(new ItemStackPredicateParser<>(), ItemStackPredicate.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@
/**
* Argument for selecting one or more {@link Entity Entities} using a {@link Selector}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class MultipleEntitySelectorParser<C> implements NodeSource,
ArgumentParser.FutureArgumentParser<C, MultipleEntitySelector>, SuggestionProvider<C> {

/**
* Creates a new {@link MultipleEntitySelectorParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, MultipleEntitySelector> multipleEntitySelectorParser() {
return ParserDescriptor.of(new MultipleEntitySelectorParser<>(), MultipleEntitySelector.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,17 @@
/**
* Argument for selecting one or more {@link Player Players} using a {@link Selector}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class MultiplePlayerSelectorParser<C> implements NodeSource,
ArgumentParser.FutureArgumentParser<C, MultiplePlayerSelector>, SuggestionProvider<C> {

/**
* Creates a new {@link MultiplePlayerSelectorParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, MultiplePlayerSelector> multiplePlayerSelectorParser() {
return ParserDescriptor.of(new MultiplePlayerSelectorParser<>(), MultiplePlayerSelector.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@
/**
* An argument for parsing {@link NamedTextColor NamedTextColors}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class NamedTextColorParser<C> implements NodeSource, ArgumentParser<C, NamedTextColor>, BlockingSuggestionProvider.Strings<C> {

/**
* Creates a new {@link NamedTextColorParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, NamedTextColor> namedTextColorParser() {
return ParserDescriptor.of(new NamedTextColorParser<>(), NamedTextColor.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@
/**
* An argument for parsing {@link Operator Operators}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class OperatorParser<C> implements NodeSource, ArgumentParser<C, Operator>, BlockingSuggestionProvider.Strings<C> {

/**
* Creates a new {@link OperatorParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, Operator> operatorParser() {
return ParserDescriptor.of(new OperatorParser<>(), Operator.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,17 @@
* <li>{@code diamond_sword{Enchantments:[{id:sharpness,lvl:5}]}}</li>
* </ul>
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class ProtoItemStackParser<C> implements NodeSource,
ArgumentParser.FutureArgumentParser<C, ProtoItemStack>, SuggestionProvider<C> {

/**
* Creates a new {@link ProtoItemStackParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, ProtoItemStack> protoItemStackParser() {
return ParserDescriptor.of(new ProtoItemStackParser<>(), ProtoItemStack.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/**
* An argument for retrieving values from any of Sponge's {@link Registry Registries}.
*
* @param <C> sender type
* @param <C> command sender type
* @param <V> value type
*/
public final class RegistryEntryParser<C, V> implements NodeSource,
Expand All @@ -64,12 +64,12 @@ public final class RegistryEntryParser<C, V> implements NodeSource,
// Start DefaultedRegistryType methods

/**
* Create a new required {@link RegistryEntryParser} for a {@link DefaultedRegistryType}.
* Create a new {@link RegistryEntryParser} for a {@link DefaultedRegistryType}.
*
* @param <C> command sender type
* @param <V> value type
* @param valueType value type
* @param registryType registry type
* @param <C> sender type
* @param <V> value type
* @return a new {@link RegistryEntryParser}
*/
public static <C, V> @NonNull ParserDescriptor<C, V> registryEntryParser(
Expand All @@ -80,12 +80,12 @@ public final class RegistryEntryParser<C, V> implements NodeSource,
}

/**
* Create a new required {@link RegistryEntryParser} for a {@link DefaultedRegistryType}.
* Create a new {@link RegistryEntryParser} for a {@link DefaultedRegistryType}.
*
* @param <C> command sender type
* @param <V> value type
* @param valueType value type
* @param registryType registry type
* @param <C> sender type
* @param <V> value type
* @return a new {@link RegistryEntryParser}
*/
public static <C, V> @NonNull ParserDescriptor<C, V> registryEntryParser(
Expand All @@ -100,13 +100,13 @@ public final class RegistryEntryParser<C, V> implements NodeSource,
// Start RegistryType methods

/**
* Create a new required {@link RegistryEntryParser} for a {@link RegistryType}
* Create a new {@link RegistryEntryParser} for a {@link RegistryType}
* using the specified {@link RegistryHolder} function.
*
* <p>For {@link RegistryType RegistryTypes} which are {@link DefaultedRegistryType DefaultedRegistryTypes},
* it is suggested to instead use {@link #registryEntryParser(TypeToken, DefaultedRegistryType)}.</p>
*
* @param <C> sender type
* @param <C> command sender type
* @param <V> value type
* @param valueType value type
* @param registryType registry type
Expand All @@ -122,13 +122,13 @@ public final class RegistryEntryParser<C, V> implements NodeSource,
}

/**
* Create a new required {@link RegistryEntryParser} for a {@link RegistryType}
* Create a new {@link RegistryEntryParser} for a {@link RegistryType}
* using the specified {@link RegistryHolder} function.
*
* <p>For {@link RegistryType RegistryTypes} which are {@link DefaultedRegistryType DefaultedRegistryTypes},
* it is suggested to instead use {@link #registryEntryParser(TypeToken, DefaultedRegistryType)}.</p>
*
* @param <C> sender type
* @param <C> command sender type
* @param <V> value type
* @param valueType value type
* @param registryType registry type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@
/**
* Argument for parsing {@link ResourceKey ResourceKeys}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class ResourceKeyParser<C> implements NodeSource, ArgumentParser<C, ResourceKey> {

/**
* Creates a new {@link ResourceKeyParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, ResourceKey> resourceKeyParser() {
return ParserDescriptor.of(new ResourceKeyParser<>(), ResourceKey.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,17 @@
/**
* Argument for selecting a single {@link Entity} using a {@link Selector}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class SingleEntitySelectorParser<C> implements NodeSource,
ArgumentParser.FutureArgumentParser<C, SingleEntitySelector>, SuggestionProvider<C> {

/**
* Creates a new {@link SingleEntitySelectorParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, SingleEntitySelector> singleEntitySelectorParser() {
return ParserDescriptor.of(new SingleEntitySelectorParser<>(), SingleEntitySelector.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@
/**
* Argument for selecting a single {@link Player} using a {@link Selector}.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class SinglePlayerSelectorParser<C> implements NodeSource,
ArgumentParser.FutureArgumentParser<C, SinglePlayerSelector>, SuggestionProvider<C> {

/**
* Creates a new {@link SinglePlayerSelectorParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, SinglePlayerSelector> singlePlayerSelectorParser() {
return ParserDescriptor.of(new SinglePlayerSelectorParser<>(), SinglePlayerSelector.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,16 @@
* Argument for parsing {@link User} {@link UUID UUIDs} in the {@link UserManager} from
* a {@link Selector}, last known username, or {@link UUID} string.
*
* @param <C> sender type
* @param <C> command sender type
*/
public final class UserParser<C> implements NodeSource, ArgumentParser<C, UUID>, SuggestionProvider<C> {

/**
* Creates a new {@link UserParser}.
*
* @param <C> command sender type
* @return new parser
*/
public static <C> ParserDescriptor<C, UUID> userParser() {
return ParserDescriptor.of(new UserParser<>(), UUID.class);
}
Expand Down
Loading

0 comments on commit 3f070e5

Please sign in to comment.