}
@Override
public void process(final ProcessMethodContext processMethodContext) {
final TypeOf annotation = getAnnotation(processMethodContext.getMethod(), TypeOf.class);
final Class<?> methodReturnType = processMethodContext.getMethod().getReturnType();
if (!collectionTypeRegistry.isCollectionType(methodReturnType)
&& !collectionTypeRegistry.isArrayType(methodReturnType)) {
return;
}
final Class<?> returnType = processMethodContext.getMethod().getReturnType();
if (returnType.isArray()) {
final Class<?> componentType = returnType.getComponentType();
FacetUtil.addFacet(new TypeOfFacetInferredFromArray(componentType, processMethodContext.getFacetHolder(),
getSpecificationLookup()));
return;
}
if (annotation != null) {
FacetUtil.addFacet(new TypeOfFacetAnnotationForCollection(annotation.value(), processMethodContext
.getFacetHolder(), getSpecificationLookup()));
return;
}
final Type type = processMethodContext.getMethod().getGenericReturnType();