}
private void processInterface(Class<?> clazz,
JavaServiceContract contract,
Map<String, Operation<Type>> operations) {
DataType interfaceDataType = clazz.getAnnotation(DataType.class);
if (interfaceDataType != null) {
contract.setDataBinding(interfaceDataType.name());
// FIXME: [rfeng] Keep data context as metadata?
for (DataContext c : interfaceDataType.context()) {
contract.setMetaData(c.key(), c.value());
}
}
for (Method method : clazz.getMethods()) {
Operation<?> operation = operations.get(method.getName());
DataType operationDataType = method.getAnnotation(DataType.class);
if (operationDataType != null) {
operation.setDataBinding(operationDataType.name());
// FIXME: [rfeng] Keep data context as metadata?
for (DataContext c : operationDataType.context()) {
operation.setMetaData(c.key(), c.value());
}
}
String dataBinding = operation.getDataBinding();