service.getInterfaceContract().setInterface(javaInterface);
return service;
}
public void processCallback(Class<?> interfaze, Contract contract) throws InvalidServiceType {
Callback callback = interfaze.getAnnotation(Callback.class);
if (callback != null && !Void.class.equals(callback.value())) {
Class<?> callbackClass = callback.value();
JavaInterface javaInterface;
try {
javaInterface = javaFactory.createJavaInterface(callbackClass);
contract.getInterfaceContract().setCallbackInterface(javaInterface);
} catch (InvalidInterfaceException e) {
throw new InvalidServiceType("Invalid callback interface "+callbackClass, interfaze);
}
} else if (callback != null && Void.class.equals(callback.value())) {
throw new InvalidServiceType("No callback interface specified on annotation", interfaze);
}
}