public class DeclaredCommandMethod extends Object implements CommandMethod
Method
interface
with specific information that is necessary to construct RedisCommand
for the method.Modifier and Type | Method and Description |
---|---|
static CommandMethod |
create(Method method)
Create a new
DeclaredCommandMethod given a Method . |
boolean |
equals(Object o) |
ResolvableType |
getActualReturnType() |
<A extends Annotation> |
getAnnotation(Class<A> annotationClass)
Lookup a method annotation.
|
Method |
getMethod() |
String |
getName() |
Parameters<? extends Parameter> |
getParameters() |
ResolvableType |
getReturnType() |
boolean |
hasAnnotation(Class<? extends Annotation> annotationClass) |
int |
hashCode() |
boolean |
isBatchExecution() |
boolean |
isFutureExecution() |
boolean |
isReactiveExecution() |
String |
toString() |
public static CommandMethod create(Method method)
DeclaredCommandMethod
given a Method
.method
- must not be null.public Parameters<? extends Parameter> getParameters()
getParameters
in interface CommandMethod
Parameters
.public Method getMethod()
getMethod
in interface CommandMethod
Method
.public ResolvableType getReturnType()
getReturnType
in interface CommandMethod
Method
return TypeInformation
.public ResolvableType getActualReturnType()
getActualReturnType
in interface CommandMethod
Method
return TypeInformation
after unwrapping.public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
getAnnotation
in interface CommandMethod
annotationClass
- the annotation class.null
if not found.public boolean hasAnnotation(Class<? extends Annotation> annotationClass)
hasAnnotation
in interface CommandMethod
annotationClass
- the annotation class.true
if the method is annotated with annotationClass
.public String getName()
getName
in interface CommandMethod
public boolean isFutureExecution()
isFutureExecution
in interface CommandMethod
true
if the method uses asynchronous execution declaring Future
as result type.public boolean isReactiveExecution()
isReactiveExecution
in interface CommandMethod
true
if the method uses reactive execution declaring Publisher
as result type.public boolean isBatchExecution()
isBatchExecution
in interface CommandMethod
true
if the method defines a CommandBatching
argument.Copyright © 2023 lettuce.io. All rights reserved.