Package feign
Class Contract.BaseContract
- java.lang.Object
-
- feign.Contract.BaseContract
-
- All Implemented Interfaces:
Contract
- Direct Known Subclasses:
Contract.Default
- Enclosing interface:
- Contract
public abstract static class Contract.BaseContract extends java.lang.Object implements Contract
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface feign.Contract
Contract.BaseContract, Contract.Default
-
-
Constructor Summary
Constructors Constructor Description BaseContract()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidnameParam(MethodMetadata data, java.lang.String name, int i)links a parameter name to its index in the method signature.java.util.List<MethodMetadata>parseAndValidatateMetadata(java.lang.Class<?> targetType)Called to parse the methods in the class that are linked to HTTP requests.MethodMetadataparseAndValidatateMetadata(java.lang.reflect.Method method)Deprecated.useparseAndValidateMetadata(Class, Method)instead.protected MethodMetadataparseAndValidateMetadata(java.lang.Class<?> targetType, java.lang.reflect.Method method)Called indirectly byparseAndValidatateMetadata(Class).protected abstract voidprocessAnnotationOnClass(MethodMetadata data, java.lang.Class<?> clz)Called by parseAndValidateMetadata twice, first on the declaring class, then on the target type (unless they are the same).protected abstract voidprocessAnnotationOnMethod(MethodMetadata data, java.lang.annotation.Annotation annotation, java.lang.reflect.Method method)protected abstract booleanprocessAnnotationsOnParameter(MethodMetadata data, java.lang.annotation.Annotation[] annotations, int paramIndex)
-
-
-
Method Detail
-
parseAndValidatateMetadata
public java.util.List<MethodMetadata> parseAndValidatateMetadata(java.lang.Class<?> targetType)
Description copied from interface:ContractCalled to parse the methods in the class that are linked to HTTP requests.- Specified by:
parseAndValidatateMetadatain interfaceContract- Parameters:
targetType-typeof the Feign interface.
-
parseAndValidatateMetadata
@Deprecated public MethodMetadata parseAndValidatateMetadata(java.lang.reflect.Method method)
Deprecated.useparseAndValidateMetadata(Class, Method)instead.
-
parseAndValidateMetadata
protected MethodMetadata parseAndValidateMetadata(java.lang.Class<?> targetType, java.lang.reflect.Method method)
Called indirectly byparseAndValidatateMetadata(Class).
-
processAnnotationOnClass
protected abstract void processAnnotationOnClass(MethodMetadata data, java.lang.Class<?> clz)
Called by parseAndValidateMetadata twice, first on the declaring class, then on the target type (unless they are the same).- Parameters:
data- metadata collected so far relating to the current java method.clz- the class to process
-
processAnnotationOnMethod
protected abstract void processAnnotationOnMethod(MethodMetadata data, java.lang.annotation.Annotation annotation, java.lang.reflect.Method method)
- Parameters:
data- metadata collected so far relating to the current java method.annotation- annotations present on the current method annotation.method- method currently being processed.
-
processAnnotationsOnParameter
protected abstract boolean processAnnotationsOnParameter(MethodMetadata data, java.lang.annotation.Annotation[] annotations, int paramIndex)
- Parameters:
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 inannotations, callnameParam(MethodMetadata, String, int)with this as the last parameter.- Returns:
- true if you called
nameParam(MethodMetadata, String, int)after finding an http-relevant annotation.
-
nameParam
protected void nameParam(MethodMetadata data, java.lang.String name, int i)
links a parameter name to its index in the method signature.
-
-