public abstract static class Contract.BaseContract extends Object implements Contract
Contract.BaseContract, Contract.Default
Constructor and Description |
---|
BaseContract() |
Modifier and Type | Method and Description |
---|---|
protected void |
nameParam(MethodMetadata data,
String name,
int i)
links a parameter name to its index in the method signature.
|
List<MethodMetadata> |
parseAndValidateMetadata(Class<?> targetType)
Called to parse the methods in the class that are linked to HTTP requests.
|
protected MethodMetadata |
parseAndValidateMetadata(Class<?> targetType,
Method method)
Called indirectly by
parseAndValidateMetadata(Class) . |
MethodMetadata |
parseAndValidateMetadata(Method method)
Deprecated.
use
parseAndValidateMetadata(Class, Method) instead. |
protected abstract void |
processAnnotationOnClass(MethodMetadata data,
Class<?> clz)
Called by parseAndValidateMetadata twice, first on the declaring class, then on the target
type (unless they are the same).
|
protected abstract void |
processAnnotationOnMethod(MethodMetadata data,
Annotation annotation,
Method method) |
protected abstract boolean |
processAnnotationsOnParameter(MethodMetadata data,
Annotation[] annotations,
int paramIndex) |
public List<MethodMetadata> parseAndValidateMetadata(Class<?> targetType)
Contract
parseAndValidateMetadata
in interface Contract
targetType
- type
of the Feign interface.parseAndValidateMetadata(Class)
@Deprecated public MethodMetadata parseAndValidateMetadata(Method method)
parseAndValidateMetadata(Class, Method)
instead.protected MethodMetadata parseAndValidateMetadata(Class<?> targetType, Method method)
parseAndValidateMetadata(Class)
.protected abstract void processAnnotationOnClass(MethodMetadata data, Class<?> clz)
data
- metadata collected so far relating to the current java method.clz
- the class to processprotected abstract void processAnnotationOnMethod(MethodMetadata data, Annotation annotation, Method method)
data
- metadata collected so far relating to the current java method.annotation
- annotations present on the current method annotation.method
- method currently being processed.protected abstract boolean processAnnotationsOnParameter(MethodMetadata data, Annotation[] annotations, int paramIndex)
data
- metadata collected so far relating to the current java method.annotations
- annotations present on the current parameter annotation.paramIndex
- if you find a name in annotations
, call
nameParam(MethodMetadata, String, int)
with this as the last parameter.nameParam(MethodMetadata, String, int)
after finding an
http-relevant annotation.protected void nameParam(MethodMetadata data, String name, int i)
Copyright © 2012–2020 OpenFeign. All rights reserved.