if (annotation == null) {
// scan intefaces for remotable
Set<Class> interfaces = getAllInterfaces(clazz);
for (Class<?> interfaze : interfaces) {
if (interfaze.isAnnotationPresent(Remotable.class) || interfaze.isAnnotationPresent(Callback.class)) {
Service service;
try {
service = createService(interfaze);
} catch (InvalidInterfaceException e) {
throw new IntrospectionException(e);
}
type.getServices().add(service);
}
}
return;
}
Class<?>[] interfaces = annotation.interfaces();
if (interfaces.length == 0) {
Class<?> interfaze = annotation.value();
if (Void.class.equals(interfaze)) {
throw new IllegalServiceDefinitionException("No interfaces specified");
} else {
interfaces = new Class<?>[1];
interfaces[0] = interfaze;
}
}
for (Class<?> interfaze : interfaces) {
try {
Service service = createService(interfaze);
type.getServices().add(service);
} catch (InvalidInterfaceException e) {
throw new IntrospectionException(e);
}
}