Package com.mrivanplays.jdcf.args
Interface ArgumentResolver<T>
-
- Type Parameters:
T
- resolved to type
- All Known Implementing Classes:
CaseArgumentResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ArgumentResolver<T>
Represents a argument resolver which resolves a single argument into a type specified.This is a functional interface whose abstract method is
resolve(ArgumentResolverContext)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
resolve(@NotNull ArgumentResolverContext context)
Resolves the input argument into the type this resolver resolves.
-
-
-
Method Detail
-
resolve
@Nullable T resolve(@NotNull @NotNull ArgumentResolverContext context) throws java.lang.Exception
Resolves the input argument into the type this resolver resolves. This method may throw exceptions which will triggerRestArgumentAction.orElse(Consumer)
withFailReason
ofARGUMENT_PARSED_NOT_TYPE
if used uponCommandArguments.next(ArgumentResolver)
.- Parameters:
context
- context containing data about the argument- Returns:
- a resolved argument, or null.
- Throws:
java.lang.Exception
-
-