RestEndpoints endpoints = clazz.getAnnotation(RestEndpoints.class);
if (endpoints != null) {
RestEndpoint[] list = endpoints.value();
if ((list != null) && (list.length > 0)) {
for (RestEndpoint endpoint : list) {
Service service = clazz.getAnnotation(Service.class);
String configBean = endpoint.configBean().getSimpleName();
CommandResourceMetaData metaData = new CommandResourceMetaData();
metaData.command = service.name();
metaData.httpMethod = endpoint.opType().name();
metaData.resourcePath = endpoint.path().isEmpty() ? service.name() : endpoint.path();
metaData.displayName = endpoint.description().isEmpty() ? metaData.resourcePath : endpoint.description();
metaData.commandParams = new ParameterMetaData[endpoint.params().length];
int index = 0;
for (RestParam param : endpoint.params()) {