MethodSignature

public abstract class MethodSignature<H extends HandlerMethod<? extends Object, ? extends Object, E, ? extends Object>, E extends MessageEnvelope<? extends Object, ? extends Object, ? extends Object>>

Specification of a handler method signature.

Sets the requirements to meet for the java.lang.reflect.Method in order to be qualified as a Message handler method.

By extending this base class, descendants define the number of requirements:

Parameters

<H>

the type of the handler method

<E>

the type of envelope, which is used to invoke the handler method

Inheritors

Constructors

Link copied to clipboard
protected void MethodSignature(Class<? extends Annotation> annotation)
Creates an instance of signature, defining the required annotation to be present in the methods, that are matched against this signature.

Functions

Link copied to clipboard
protected Optional<Class<? extends Throwable>> allowedThrowable()
Obtains the type of a Throwable which a method can declare.
Link copied to clipboard
public final Class<? extends Annotation> annotation()
Obtains the annotation, which is required to be declared for the matched raw method.
Link copied to clipboard
public final Optional<H> classify(Method method)
Creates a handler method from a raw method, if the passed method matches the signature.
Link copied to clipboard
public abstract H create(Method method, ParameterSpec<E> params)
Creates the HandlerMethod instance according to the passed raw method and the parameter specification.
Link copied to clipboard
public final Collection<SignatureMismatch> match(Method method)
Match the method against the criteria and obtain a collection of mismatches, if any.
Link copied to clipboard
public final boolean matches(Method method)
Checks whether the passed method matches the constraints set by this MethodSignature instance.
Link copied to clipboard
public abstract boolean mayReturnIgnored()
Determines if a method with this signature may return an isIgnored ignored} result.
Link copied to clipboard
Obtains the set of recommended access modifiers for the method.
Link copied to clipboard
public abstract AllowedParams<E> params()
Obtains the specification of handler parameters to meet.
Link copied to clipboard
protected abstract ReturnTypes returnTypes()
Obtains the set of valid return types.
Link copied to clipboard
protected boolean skipMethod(Method method)
Determines, if the given raw method should be skipped as non-matching.