com.github.tcurrie.rest.factory.service.RestMethodDictionary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest.factory Show documentation
Show all versions of rest.factory Show documentation
Simple rest client-server factory, you give it a url, it does the rest!
package com.github.tcurrie.rest.factory.service;
import java.util.List;
public interface RestMethodDictionary {
List getMethods();
final class MethodDescription {
private final String uri;
private final String method;
private final String bean;
public static MethodDescription create(final RestMethod h) {
return new MethodDescription(h.getUri(), h.getMethod().getName(), h.getBean().getClass().getCanonicalName());
}
private MethodDescription(final String uri, final String method, final String bean) {
this.uri = uri;
this.method = method;
this.bean = bean;
}
public String getUri() {
return uri;
}
public String getMethod() {
return method;
}
public String getBean() {
return bean;
}
@Override
public String toString() {
return "MethodDescription{" +
"uri='" + uri + '\'' +
", method='" + method + '\'' +
", bean='" + bean + '\'' +
'}';
}
}
}