Skip to content

Commit fe826e2

Browse files
chore: package cleanup (#659)
* chore: package cleanup annotations.injection -> injection annotations.specifier -> parser.specifier annotations.* -> util.annotation arguments.parser -> parser * move parsers into `parser` * move suggestion package to top level * arguments -> components, move CommandComponent & move extract syntax formatters * exceptions -> exception * move descriptions into `description` * captions -> caption * types -> type, types.tuples -> type.tuple * depluralize cloud-annotations * rename cloud-services packages too * keys -> key * Move CommandBeans to own package * `CommandSuggestionProcessor` -> `SuggestionProcessor`, move some classes to suggestion/execution package * Clean up CommandExecutionHandler * Standardize command sender type param jd * Move all standard parsers to parser.standard * Move annotations to `annotation.specifier` * Remove 1.x Javadoc since tags and API annotation since values * Remove 2.0.0 Javadoc since tags and API annotation since values * Fix regex for removing since tags and apply again * fix style --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
1 parent 65dfc9d commit fe826e2

File tree

367 files changed

+1667
-2051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

367 files changed

+1667
-2051
lines changed

cloud-annotations/src/main/java/cloud/commandframework/annotations/AnnotationMapper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//
2424
package cloud.commandframework.annotations;
2525

26-
import cloud.commandframework.arguments.parser.ParserParameters;
26+
import cloud.commandframework.parser.ParserParameters;
2727
import java.lang.annotation.Annotation;
2828
import org.apiguardian.api.API;
2929
import org.checkerframework.checker.nullness.qual.NonNull;
@@ -32,9 +32,8 @@
3232
* Maps annotations to {@link ParserParameters parser parameters}.
3333
*
3434
* @param <A> annotation type
35-
* @since 2.0.0
3635
*/
37-
@API(status = API.Status.STABLE, since = "2.0.0")
36+
@API(status = API.Status.STABLE)
3837
@FunctionalInterface
3938
public interface AnnotationMapper<A extends Annotation> {
4039

cloud-annotations/src/main/java/cloud/commandframework/annotations/AnnotationParser.java

Lines changed: 41 additions & 71 deletions
Large diffs are not rendered by default.

cloud-annotations/src/main/java/cloud/commandframework/annotations/Argument.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525

2626
import cloud.commandframework.annotations.extractor.ParameterNameExtractor;
2727
import cloud.commandframework.annotations.extractor.StandardArgumentExtractor;
28-
import cloud.commandframework.arguments.suggestion.SuggestionProvider;
28+
import cloud.commandframework.parser.ParserRegistry;
29+
import cloud.commandframework.suggestion.SuggestionProvider;
2930
import java.lang.annotation.ElementType;
3031
import java.lang.annotation.Retention;
3132
import java.lang.annotation.RetentionPolicy;
@@ -64,16 +65,15 @@
6465
/**
6566
* Name of the suggestion provider to use. If the string is left empty, the default
6667
* provider for the argument parser will be used. Otherwise,
67-
* the {@link cloud.commandframework.arguments.parser.ParserRegistry} instance in the
68+
* the {@link ParserRegistry} instance in the
6869
* {@link cloud.commandframework.CommandManager} will be queried for a matching suggestion provider.
6970
* <p>
7071
* For this to work, the suggestion needs to be registered in the parser registry. To do this, use
71-
* {@link cloud.commandframework.arguments.parser.ParserRegistry#registerSuggestionProvider(String, SuggestionProvider)}.
72+
* {@link ParserRegistry#registerSuggestionProvider(String, SuggestionProvider)}.
7273
* The registry instance can be retrieved using {@link cloud.commandframework.CommandManager#parserRegistry()}.
7374
*
7475
* @return The name of the suggestion provider, or {@code ""} if the default suggestion provider for the argument parser
7576
* should be used instead
76-
* @since 1.1.0
7777
*/
7878
@NonNull String suggestions() default "";
7979

cloud-annotations/src/main/java/cloud/commandframework/annotations/ArgumentMode.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
/**
2727
* The mode of an argument.
28-
* <p>
29-
* Public since 1.7.0.
3028
*/
3129
public enum ArgumentMode {
3230
LITERAL,

cloud-annotations/src/main/java/cloud/commandframework/annotations/BuilderDecorator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
package cloud.commandframework.annotations;
2525

2626
import cloud.commandframework.Command;
27-
import cloud.commandframework.CommandDescription;
27+
import cloud.commandframework.description.CommandDescription;
2828
import cloud.commandframework.permission.Permission;
2929
import org.apiguardian.api.API;
3030
import org.checkerframework.checker.nullness.qual.NonNull;
@@ -33,9 +33,8 @@
3333
* Decorators that get to modify a command builder that is used to construct the command for annotated command methods.
3434
*
3535
* @param <C> the command sender type
36-
* @since 2.0.0
3736
*/
38-
@API(status = API.Status.STABLE, since = "2.0.0")
37+
@API(status = API.Status.STABLE)
3938
public interface BuilderDecorator<C> {
4039

4140
/**

cloud-annotations/src/main/java/cloud/commandframework/annotations/BuilderModifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.apiguardian.api.API;
2929
import org.checkerframework.checker.nullness.qual.NonNull;
3030

31-
@API(status = API.Status.STABLE, since = "2.0.0")
31+
@API(status = API.Status.STABLE)
3232
@FunctionalInterface
3333
public interface BuilderModifier<A extends Annotation, C> {
3434

cloud-annotations/src/main/java/cloud/commandframework/annotations/CommandDescription.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
/**
3434
* Annotation that modifies the command builder
35-
* to invoke {@link Command.Builder#commandDescription(cloud.commandframework.CommandDescription)}
36-
* using {@link cloud.commandframework.CommandDescription#commandDescription(String)}.
35+
* to invoke {@link Command.Builder#commandDescription(cloud.commandframework.description.CommandDescription)}
36+
* using {@link cloud.commandframework.description.CommandDescription#commandDescription(String)}.
3737
*/
3838
@Retention(RetentionPolicy.RUNTIME)
3939
@Target({ElementType.METHOD, ElementType.TYPE})

cloud-annotations/src/main/java/cloud/commandframework/annotations/CommandMethodExecutionHandlerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.apiguardian.api.API;
2727
import org.checkerframework.checker.nullness.qual.NonNull;
2828

29-
@API(status = API.Status.STABLE, since = "2.0.0")
29+
@API(status = API.Status.STABLE)
3030
public interface CommandMethodExecutionHandlerFactory<C> {
3131

3232
/**

cloud-annotations/src/main/java/cloud/commandframework/annotations/Commands.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@
3535
* <p>
3636
* This is required in order for {@link Command} to be repeatable.
3737
*
38-
* @since 2.0.0
3938
*/
4039
@Retention(RetentionPolicy.RUNTIME)
4140
@Target({ElementType.METHOD, ElementType.TYPE})
42-
@API(status = API.Status.STABLE, since = "2.0.0")
41+
@API(status = API.Status.STABLE)
4342
public @interface Commands {
4443

4544
/**

cloud-annotations/src/main/java/cloud/commandframework/annotations/Default.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@
3232

3333
/**
3434
* Used to give an optional command component a
35-
* {@link cloud.commandframework.arguments.DefaultValue#parsed(String) parsed default value}.
35+
* {@link cloud.commandframework.component.DefaultValue#parsed(String) parsed default value}.
3636
*
37-
* @since 2.0.0
3837
*/
3938
@Retention(RetentionPolicy.RUNTIME)
4039
@Target(ElementType.PARAMETER)
41-
@API(status = API.Status.STABLE, since = "2.0.0")
40+
@API(status = API.Status.STABLE)
4241
public @interface Default {
4342

4443
/**

0 commit comments

Comments
 (0)