Fix import order

This commit is contained in:
Jason Penilla 2021-12-01 22:00:40 -08:00 committed by Jason
parent dbf5af7202
commit 708d11854e
275 changed files with 559 additions and 834 deletions

View file

@ -38,9 +38,6 @@ import cloud.commandframework.permission.PredicatePermission;
import cloud.commandframework.types.tuples.Pair;
import cloud.commandframework.types.tuples.Triplet;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@ -51,6 +48,8 @@ import java.util.Optional;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* A command consists out of a chain of {@link CommandArgument command arguments}.

View file

@ -24,9 +24,8 @@
package cloud.commandframework;
import cloud.commandframework.arguments.CommandArgument;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* A single literal or argument component of a command

View file

@ -26,9 +26,6 @@ package cloud.commandframework;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.arguments.StaticArgument;
import cloud.commandframework.meta.CommandMeta;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@ -39,6 +36,8 @@ import java.util.Locale;
import java.util.Objects;
import java.util.Set;
import java.util.function.Predicate;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public final class CommandHelpHandler<C> {

View file

@ -60,9 +60,6 @@ import cloud.commandframework.permission.PredicatePermission;
import cloud.commandframework.services.ServicePipeline;
import cloud.commandframework.services.State;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
@ -76,6 +73,8 @@ import java.util.concurrent.atomic.AtomicReference;
import java.util.function.BiConsumer;
import java.util.function.Function;
import java.util.function.Predicate;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* The manager is responsible for command registration, parsing delegation, etc.

View file

@ -43,9 +43,6 @@ import cloud.commandframework.permission.OrPermission;
import cloud.commandframework.types.tuples.Pair;
import io.leangen.geantyref.GenericTypeReflector;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -63,6 +60,8 @@ import java.util.Queue;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Tree containing all commands and command paths.

View file

@ -26,9 +26,8 @@ package cloud.commandframework;
import cloud.commandframework.execution.AsynchronousCommandExecutionCoordinator;
import cloud.commandframework.execution.CommandExecutionCoordinator;
import cloud.commandframework.internal.CommandRegistrationHandler;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* {@link CommandManager} implementation that allows you to lock command registrations.

View file

@ -23,15 +23,14 @@
//
package cloud.commandframework.annotations;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
final class AnnotatedElementAccessor implements AnnotationAccessor {

View file

@ -23,13 +23,12 @@
//
package cloud.commandframework.annotations;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.util.Collection;
import java.util.Collections;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Managed access for {@link java.lang.annotation.Annotation} instances

View file

@ -23,14 +23,13 @@
//
package cloud.commandframework.annotations;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
final class MultiDelegateAnnotationAccessor implements AnnotationAccessor {

View file

@ -28,9 +28,6 @@ import cloud.commandframework.context.CommandContext;
import cloud.commandframework.services.ServicePipeline;
import cloud.commandframework.types.tuples.Triplet;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@ -39,6 +36,8 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Registry containing mappings between {@link Class classes} and {@link ParameterInjector injectors}

View file

@ -24,12 +24,11 @@
package cloud.commandframework.annotations.specifier;
import cloud.commandframework.arguments.parser.ArgumentParser;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Used to specify min and max values of numerical

View file

@ -34,9 +34,6 @@ import cloud.commandframework.keys.CloudKey;
import cloud.commandframework.keys.CloudKeyHolder;
import cloud.commandframework.keys.SimpleCloudKey;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
@ -45,6 +42,8 @@ import java.util.Objects;
import java.util.Queue;
import java.util.function.BiFunction;
import java.util.regex.Pattern;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* A argument that belongs to a command

View file

@ -24,9 +24,8 @@
package cloud.commandframework.arguments;
import cloud.commandframework.context.CommandContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Handler that produces command suggestions depending on input

View file

@ -24,11 +24,10 @@
package cloud.commandframework.arguments;
import cloud.commandframework.CommandTree;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
/**
* Utility that formats chains of {@link CommandArgument command arguments} into syntax strings
*

View file

@ -29,11 +29,10 @@ import cloud.commandframework.context.CommandContext;
import cloud.commandframework.execution.preprocessor.CommandPreprocessingContext;
import cloud.commandframework.internal.CommandInputTokenizer;
import cloud.commandframework.services.State;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Command suggestion engine that delegates to a {@link cloud.commandframework.CommandTree}

View file

@ -25,10 +25,9 @@ package cloud.commandframework.arguments;
import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
final class DelegatingSuggestionsProvider<C> implements BiFunction<@NonNull CommandContext<C>,
@NonNull String, @NonNull List<String>> {

View file

@ -27,11 +27,10 @@ import cloud.commandframework.CommandTree;
import cloud.commandframework.arguments.compound.CompoundArgument;
import cloud.commandframework.arguments.compound.FlagArgument;
import cloud.commandframework.arguments.flags.CommandFlag;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Iterator;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* {@link CommandSyntaxFormatter} implementation that uses the following rules:

View file

@ -27,8 +27,6 @@ import cloud.commandframework.arguments.parser.ArgumentParseResult;
import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -37,6 +35,7 @@ import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.TreeSet;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* {@link CommandArgument} type that recognizes fixed strings. This type does not parse variables.

View file

@ -29,9 +29,8 @@ import cloud.commandframework.arguments.parser.ParserParameters;
import cloud.commandframework.arguments.parser.ParserRegistry;
import cloud.commandframework.types.tuples.Pair;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* A compound argument consisting of two inner arguments

View file

@ -29,9 +29,8 @@ import cloud.commandframework.arguments.parser.ParserParameters;
import cloud.commandframework.arguments.parser.ParserRegistry;
import cloud.commandframework.types.tuples.Triplet;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* A compound argument consisting of three inner arguments

View file

@ -29,12 +29,11 @@ import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.types.tuples.Tuple;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Compound argument

View file

@ -35,8 +35,6 @@ import cloud.commandframework.exceptions.parsing.ParserException;
import cloud.commandframework.keys.CloudKey;
import cloud.commandframework.keys.SimpleCloudKey;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@ -49,6 +47,7 @@ import java.util.Set;
import java.util.function.BiFunction;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Container for flag parsing logic. This should not be be used directly.

View file

@ -27,14 +27,13 @@ import cloud.commandframework.ArgumentDescription;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.permission.CommandPermission;
import cloud.commandframework.permission.Permission;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* A flag is an optional command argument that may have an associated parser,

View file

@ -23,12 +23,11 @@
//
package cloud.commandframework.arguments.flags;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Flag value mappings

View file

@ -23,10 +23,9 @@
//
package cloud.commandframework.arguments.parser;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Optional;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Result of the parsing done by a {@link ArgumentParser}

View file

@ -24,12 +24,11 @@
package cloud.commandframework.arguments.parser;
import cloud.commandframework.context.CommandContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collections;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import static java.util.Objects.requireNonNull;

View file

@ -24,12 +24,11 @@
package cloud.commandframework.arguments.parser;
import cloud.commandframework.context.CommandContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* An argument parser which wraps another argument parser, converting the output type.

View file

@ -24,9 +24,8 @@
package cloud.commandframework.arguments.parser;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Parser parameter used when retrieving parsers from the {@link ParserRegistry}

View file

@ -23,11 +23,10 @@
//
package cloud.commandframework.arguments.parser;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Collection of {@link ParserParameter parameter}-{@link Object object} pairs

View file

@ -25,14 +25,13 @@ package cloud.commandframework.arguments.parser;
import cloud.commandframework.context.CommandContext;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.function.BiFunction;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Registry of {@link ArgumentParser} that allows these arguments to be

View file

@ -42,8 +42,6 @@ import cloud.commandframework.arguments.standard.UUIDArgument;
import cloud.commandframework.context.CommandContext;
import io.leangen.geantyref.GenericTypeReflector;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.Collection;
@ -55,6 +53,7 @@ import java.util.Optional;
import java.util.UUID;
import java.util.function.BiFunction;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Standard implementation of {@link ParserRegistry}

View file

@ -29,12 +29,11 @@ import cloud.commandframework.captions.CaptionVariable;
import cloud.commandframework.captions.StandardCaptionKeys;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Queue;
import java.util.function.BiFunction;
import java.util.function.Predicate;
import java.util.regex.Pattern;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Command preprocessor that filters based on regular expressions

View file

@ -32,13 +32,12 @@ import cloud.commandframework.captions.StandardCaptionKeys;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.ParserException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Arrays;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class BooleanArgument<C> extends CommandArgument<C, Boolean> {

View file

@ -30,12 +30,11 @@ import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.NumberParseException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class ByteArgument<C> extends CommandArgument<C, Byte> {

View file

@ -32,12 +32,11 @@ import cloud.commandframework.captions.StandardCaptionKeys;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.ParserException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class CharArgument<C> extends CommandArgument<C, Character> {

View file

@ -30,12 +30,11 @@ import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.NumberParseException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class DoubleArgument<C> extends CommandArgument<C, Double> {

View file

@ -32,14 +32,13 @@ import cloud.commandframework.captions.StandardCaptionKeys;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.ParserException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.EnumSet;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import java.util.stream.Collectors;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Argument type that recognizes enums

View file

@ -30,12 +30,11 @@ import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.NumberParseException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class FloatArgument<C> extends CommandArgument<C, Float> {

View file

@ -30,9 +30,6 @@ import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.NumberParseException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@ -40,6 +37,8 @@ import java.util.Queue;
import java.util.Set;
import java.util.TreeSet;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class IntegerArgument<C> extends CommandArgument<C, Integer> {

View file

@ -30,12 +30,11 @@ import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.NumberParseException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class LongArgument<C> extends CommandArgument<C, Long> {

View file

@ -30,12 +30,11 @@ import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.NumberParseException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class ShortArgument<C> extends CommandArgument<C, Short> {

View file

@ -33,8 +33,6 @@ import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.ParserException;
import cloud.commandframework.util.StringUtils;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collections;
import java.util.List;
import java.util.Queue;
@ -42,6 +40,7 @@ import java.util.StringJoiner;
import java.util.function.BiFunction;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.checkerframework.checker.nullness.qual.NonNull;
@SuppressWarnings("unused")
public final class StringArgument<C> extends CommandArgument<C, String> {

View file

@ -29,12 +29,11 @@ import cloud.commandframework.arguments.parser.ArgumentParseResult;
import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.context.CommandContext;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* This is a command argument type that essentially mimics {@link StringArgument#greedy(String)},

View file

@ -32,13 +32,12 @@ import cloud.commandframework.captions.StandardCaptionKeys;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import cloud.commandframework.exceptions.parsing.ParserException;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
import java.util.Queue;
import java.util.UUID;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@SuppressWarnings("unused")
public final class UUIDArgument<C> extends CommandArgument<C, UUID> {

View file

@ -23,9 +23,8 @@
//
package cloud.commandframework.captions;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* This is a reference to a caption and does not contain any message itself

View file

@ -23,9 +23,8 @@
//
package cloud.commandframework.captions;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Caption registry that delegates to factory methods

View file

@ -23,11 +23,10 @@
//
package cloud.commandframework.captions;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.HashMap;
import java.util.Map;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Caption registry that uses bi-functions to produce messages

View file

@ -23,11 +23,10 @@
//
package cloud.commandframework.captions;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* {@link Caption} instances for messages in cloud-core

View file

@ -36,15 +36,14 @@ import cloud.commandframework.keys.CloudKey;
import cloud.commandframework.keys.CloudKeyHolder;
import cloud.commandframework.keys.SimpleCloudKey;
import cloud.commandframework.permission.CommandPermission;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Command context used to assist in the parsing of commands

View file

@ -26,11 +26,10 @@ package cloud.commandframework.exceptions;
import cloud.commandframework.CommandTree;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.context.CommandContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Iterator;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Exception thrown when a {@link CommandContext}

View file

@ -24,9 +24,8 @@
package cloud.commandframework.exceptions;
import cloud.commandframework.arguments.CommandArgument;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
public class ArgumentParseException extends CommandParseException {

View file

@ -24,10 +24,9 @@
package cloud.commandframework.exceptions;
import cloud.commandframework.arguments.CommandArgument;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collections;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Exception thrown when parsing user input into a command

View file

@ -25,11 +25,10 @@ package cloud.commandframework.exceptions;
import cloud.commandframework.Command;
import cloud.commandframework.arguments.CommandArgument;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.List;
/**
* Exception thrown when an invalid command sender tries to execute a command
*/

View file

@ -24,9 +24,8 @@
package cloud.commandframework.exceptions;
import cloud.commandframework.arguments.CommandArgument;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Exception sent when a command sender inputs invalid command syntax

View file

@ -26,9 +26,8 @@ package cloud.commandframework.exceptions;
import cloud.commandframework.Command;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.permission.CommandPermission;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Exception thrown when a command sender misses a permission required

View file

@ -24,9 +24,8 @@
package cloud.commandframework.exceptions;
import cloud.commandframework.arguments.CommandArgument;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Exception thrown when a command sender tries to execute

View file

@ -26,9 +26,8 @@ package cloud.commandframework.exceptions.parsing;
import cloud.commandframework.captions.Caption;
import cloud.commandframework.captions.CaptionVariable;
import cloud.commandframework.context.CommandContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Arrays;
import org.checkerframework.checker.nullness.qual.NonNull;
public class ParserException extends IllegalArgumentException {

View file

@ -30,15 +30,14 @@ import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.CommandExecutionException;
import cloud.commandframework.services.State;
import cloud.commandframework.types.tuples.Pair;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Queue;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.concurrent.ForkJoinPool;
import java.util.function.Consumer;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Execution coordinator parses and/or executes commands on a separate thread from the calling thread

View file

@ -29,13 +29,12 @@ import cloud.commandframework.context.CommandContext;
import cloud.commandframework.exceptions.CommandExecutionException;
import cloud.commandframework.services.State;
import cloud.commandframework.types.tuples.Pair;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Objects;
import java.util.Queue;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* The command execution coordinator is responsible for

View file

@ -25,9 +25,7 @@ package cloud.commandframework.execution;
import cloud.commandframework.Command;
import cloud.commandframework.context.CommandContext;
import java.util.concurrent.CompletableFuture;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;

View file

@ -24,10 +24,9 @@
package cloud.commandframework.execution;
import cloud.commandframework.execution.preprocessor.CommandPreprocessingContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import java.util.function.BiFunction;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Processor that formats command suggestions

View file

@ -24,10 +24,9 @@
package cloud.commandframework.execution;
import cloud.commandframework.execution.preprocessor.CommandPreprocessingContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.LinkedList;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Command suggestions processor that checks the input queue head and filters based on that

View file

@ -25,9 +25,8 @@ package cloud.commandframework.execution.postprocessor;
import cloud.commandframework.Command;
import cloud.commandframework.context.CommandContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Context for {@link CommandPostprocessor command postprocessors}

View file

@ -24,10 +24,9 @@
package cloud.commandframework.execution.preprocessor;
import cloud.commandframework.context.CommandContext;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.LinkedList;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Context for {@link CommandPreprocessor command preprocessors}

View file

@ -31,16 +31,13 @@ import cloud.commandframework.meta.CommandMeta;
import cloud.commandframework.meta.SimpleCommandMeta;
import cloud.commandframework.services.types.ConsumerService;
import cloud.commandframework.types.tuples.Pair;
import java.util.concurrent.CompletableFuture;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Manager for the command confirmation system that enables the ability to add "confirmation" requirements to commands,

View file

@ -23,10 +23,9 @@
//
package cloud.commandframework.internal;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.LinkedList;
import java.util.StringTokenizer;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Tokenizer that splits command inputs into tokens. This will split the string

View file

@ -24,9 +24,8 @@
package cloud.commandframework.keys;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Simple immutable implementation of {@link CloudKey}. Key equality is

View file

@ -27,12 +27,11 @@ import cloud.commandframework.Command;
import cloud.commandframework.keys.CloudKey;
import io.leangen.geantyref.GenericTypeReflector;
import io.leangen.geantyref.TypeToken;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import static java.util.Objects.requireNonNull;

View file

@ -24,14 +24,13 @@
package cloud.commandframework.meta;
import io.leangen.geantyref.GenericTypeReflector;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* A simple immutable string-string map containing command meta

View file

@ -25,11 +25,10 @@ package cloud.commandframework.meta;
import io.leangen.geantyref.GenericTypeReflector;
import io.leangen.geantyref.TypeToken;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.function.Function;
final class SimpleKey<V> implements CommandMeta.Key<V> {
private final @NonNull TypeToken<V> valueType;

View file

@ -23,14 +23,13 @@
//
package cloud.commandframework.permission;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Objects;
import java.util.Set;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Accepts if every single permission is accepted.

View file

@ -23,12 +23,11 @@
//
package cloud.commandframework.permission;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.checkerframework.checker.nullness.qual.NonNull;
import static java.util.Objects.requireNonNull;

View file

@ -23,14 +23,13 @@
//
package cloud.commandframework.permission;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Objects;
import java.util.Set;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Accepts as long as at least one of the permissions is accepted

View file

@ -23,11 +23,10 @@
//
package cloud.commandframework.permission;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collection;
import java.util.Collections;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* {@link cloud.commandframework.arguments.CommandArgument} permission

View file

@ -26,11 +26,10 @@ package cloud.commandframework.permission;
import cloud.commandframework.keys.CloudKey;
import cloud.commandframework.keys.CloudKeyHolder;
import cloud.commandframework.keys.SimpleCloudKey;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collection;
import java.util.Collections;
import java.util.function.Predicate;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* A functional {@link CommandPermission} implementation

View file

@ -24,9 +24,8 @@
package cloud.commandframework.permission;
import cloud.commandframework.keys.CloudKey;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.function.Predicate;
import org.checkerframework.checker.nullness.qual.NonNull;
final class WrappingPredicatePermission<C> implements PredicatePermission<C> {

View file

@ -23,9 +23,8 @@
//
package cloud.commandframework.types.tuples;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Immutable generic 2-tuple

View file

@ -23,9 +23,8 @@
//
package cloud.commandframework.types.tuples;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Immutable generic 5-tuple

View file

@ -23,9 +23,8 @@
//
package cloud.commandframework.types.tuples;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Immutable generic 5-tuple

View file

@ -23,9 +23,8 @@
//
package cloud.commandframework.types.tuples;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Immutable generic 6-tuple

View file

@ -23,9 +23,8 @@
//
package cloud.commandframework.types.tuples;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Immutable generic 3-tuple

View file

@ -23,17 +23,16 @@
//
package cloud.commandframework;
import static com.google.common.truth.Truth.assertThat;
import cloud.commandframework.annotations.AnnotationAccessor;
import org.junit.jupiter.api.Test;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import org.junit.jupiter.api.Test;
import static com.google.common.truth.Truth.assertThat;
public class AnnotationAccessorTest {

View file

@ -23,8 +23,6 @@
//
package cloud.commandframework;
import static cloud.commandframework.util.TestUtils.createManager;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.arguments.StaticArgument;
import cloud.commandframework.arguments.standard.IntegerArgument;
@ -32,16 +30,17 @@ import cloud.commandframework.arguments.standard.StringArgument;
import cloud.commandframework.meta.CommandMeta;
import cloud.commandframework.meta.SimpleCommandMeta;
import cloud.commandframework.types.tuples.Pair;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static cloud.commandframework.util.TestUtils.createManager;
class CommandHelpHandlerTest {

View file

@ -23,10 +23,9 @@
//
package cloud.commandframework;
import static cloud.commandframework.util.TestUtils.createManager;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.execution.CommandResult;
import java.util.Collection;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
@ -35,7 +34,7 @@ import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import java.util.Collection;
import static cloud.commandframework.util.TestUtils.createManager;
final class CommandPerformanceTest {

View file

@ -23,8 +23,6 @@
//
package cloud.commandframework;
import static com.google.common.truth.Truth.assertThat;
import cloud.commandframework.arguments.standard.IntegerArgument;
import cloud.commandframework.execution.CommandExecutionCoordinator;
import cloud.commandframework.keys.SimpleCloudKey;
@ -35,14 +33,14 @@ import cloud.commandframework.permission.CommandPermission;
import cloud.commandframework.permission.OrPermission;
import cloud.commandframework.permission.Permission;
import cloud.commandframework.permission.PredicatePermission;
import java.util.Arrays;
import java.util.concurrent.CompletionException;
import java.util.concurrent.atomic.AtomicBoolean;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.concurrent.CompletionException;
import java.util.concurrent.atomic.AtomicBoolean;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

View file

@ -23,8 +23,6 @@
//
package cloud.commandframework;
import static cloud.commandframework.util.TestUtils.createManager;
import cloud.commandframework.execution.postprocessor.CommandPostprocessingContext;
import cloud.commandframework.execution.postprocessor.CommandPostprocessor;
import cloud.commandframework.meta.SimpleCommandMeta;
@ -34,6 +32,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static cloud.commandframework.util.TestUtils.createManager;
public class CommandPostProcessorTest {
private static final boolean[] state = new boolean[]{false};

View file

@ -23,8 +23,6 @@
//
package cloud.commandframework;
import static cloud.commandframework.util.TestUtils.createManager;
import cloud.commandframework.arguments.standard.EnumArgument;
import cloud.commandframework.execution.preprocessor.CommandPreprocessingContext;
import cloud.commandframework.execution.preprocessor.CommandPreprocessor;
@ -35,6 +33,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static cloud.commandframework.util.TestUtils.createManager;
public class CommandPreProcessorTest {
private static CommandManager<TestCommandSender> manager;

View file

@ -23,8 +23,6 @@
//
package cloud.commandframework;
import static cloud.commandframework.util.TestUtils.createManager;
import cloud.commandframework.arguments.compound.ArgumentTriplet;
import cloud.commandframework.arguments.standard.BooleanArgument;
import cloud.commandframework.arguments.standard.EnumArgument;
@ -32,14 +30,14 @@ import cloud.commandframework.arguments.standard.IntegerArgument;
import cloud.commandframework.arguments.standard.StringArgument;
import cloud.commandframework.types.tuples.Pair;
import cloud.commandframework.types.tuples.Triplet;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static cloud.commandframework.util.TestUtils.createManager;
public class CommandSuggestionsTest {

View file

@ -23,14 +23,14 @@
//
package cloud.commandframework;
import static com.google.common.truth.Truth.assertThat;
import cloud.commandframework.arguments.StaticArgument;
import cloud.commandframework.arguments.standard.StringArgument;
import cloud.commandframework.meta.SimpleCommandMeta;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import static com.google.common.truth.Truth.assertThat;
class CommandTest {
@Test()

View file

@ -23,8 +23,6 @@
//
package cloud.commandframework;
import static cloud.commandframework.util.TestUtils.createManager;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.arguments.compound.ArgumentPair;
import cloud.commandframework.arguments.flags.CommandFlag;
@ -39,16 +37,16 @@ import cloud.commandframework.exceptions.NoPermissionException;
import cloud.commandframework.meta.SimpleCommandMeta;
import cloud.commandframework.types.tuples.Pair;
import io.leangen.geantyref.TypeToken;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CompletionException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static cloud.commandframework.util.TestUtils.createManager;
class CommandTreeTest {

View file

@ -23,8 +23,7 @@
//
package cloud.commandframework;
import static cloud.commandframework.util.TestUtils.createManager;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
@ -36,7 +35,7 @@ import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import java.util.concurrent.TimeUnit;
import static cloud.commandframework.util.TestUtils.createManager;
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.NANOSECONDS)

View file

@ -23,10 +23,6 @@
//
package cloud.commandframework;
import static com.google.common.truth.Truth8.assertThat;
import static cloud.commandframework.util.TestUtils.createManager;
import cloud.commandframework.annotations.AnnotationAccessor;
import cloud.commandframework.annotations.injection.GuiceInjectionService;
import cloud.commandframework.annotations.injection.ParameterInjectorRegistry;
@ -37,10 +33,12 @@ import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static cloud.commandframework.util.TestUtils.createManager;
import static com.google.common.truth.Truth8.assertThat;
public class ParameterInjectorRegistryTest {
private static final int INJECTED_INTEGER = 5;

View file

@ -23,9 +23,6 @@
//
package cloud.commandframework;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth8.assertThat;
import cloud.commandframework.annotations.specifier.Range;
import cloud.commandframework.arguments.parser.ArgumentParser;
import cloud.commandframework.arguments.parser.ParserParameters;
@ -34,15 +31,15 @@ import cloud.commandframework.arguments.parser.StandardParameters;
import cloud.commandframework.arguments.parser.StandardParserRegistry;
import cloud.commandframework.arguments.standard.IntegerArgument;
import io.leangen.geantyref.TypeToken;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.junit.jupiter.api.Test;
import java.lang.annotation.Annotation;
import java.util.Collections;
import java.util.Objects;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.junit.jupiter.api.Test;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth8.assertThat;
public class ParserRegistryTest {

View file

@ -23,17 +23,16 @@
//
package cloud.commandframework.arguments.standard;
import static com.google.common.truth.Truth.assertThat;
import static cloud.commandframework.util.TestUtils.createManager;
import cloud.commandframework.CommandManager;
import cloud.commandframework.TestCommandSender;
import java.util.concurrent.CompletionException;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.util.concurrent.CompletionException;
import static cloud.commandframework.util.TestUtils.createManager;
import static com.google.common.truth.Truth.assertThat;
class StringArgumentTest {

View file

@ -23,25 +23,23 @@
//
package cloud.commandframework.util;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.withSettings;
import cloud.commandframework.CommandManager;
import cloud.commandframework.CommandTree;
import cloud.commandframework.TestCommandSender;
import cloud.commandframework.execution.CommandExecutionCoordinator;
import cloud.commandframework.internal.CommandRegistrationHandler;
import cloud.commandframework.meta.SimpleCommandMeta;
import java.util.function.Function;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.mockito.Mockito;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.withSettings;
public final class TestUtils {
/**