public abstract static class Contract.BaseContract extends java.lang.Object implements Contract
Contract.BaseContract, Contract.Default| Constructor and Description |
|---|
Contract.BaseContract() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Collection<java.lang.String> |
addTemplatedParam(java.util.Collection<java.lang.String> possiblyNull,
java.lang.String name) |
protected void |
nameParam(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<?> declaring)
Called to parse the methods in the class that are linked to HTTP requests.
|
MethodMetadata |
parseAndValidatateMetadata(java.lang.reflect.Method method)
Called indirectly by
parseAndValidatateMetadata(Class). |
protected abstract void |
processAnnotationOnMethod(MethodMetadata data,
java.lang.annotation.Annotation annotation,
java.lang.reflect.Method method) |
protected abstract boolean |
processAnnotationsOnParameter(MethodMetadata data,
java.lang.annotation.Annotation[] annotations,
int paramIndex) |
public java.util.List<MethodMetadata> parseAndValidatateMetadata(java.lang.Class<?> declaring)
ContractparseAndValidatateMetadata in interface Contractpublic MethodMetadata parseAndValidatateMetadata(java.lang.reflect.Method method)
parseAndValidatateMetadata(Class).protected abstract void processAnnotationOnMethod(MethodMetadata data, java.lang.annotation.Annotation annotation, java.lang.reflect.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, java.lang.annotation.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 java.util.Collection<java.lang.String> addTemplatedParam(java.util.Collection<java.lang.String> possiblyNull,
java.lang.String name)
protected void nameParam(MethodMetadata data, java.lang.String name, int i)