All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tcurrie.rest.factory.service.RestMethodDictionary Maven / Gradle / Ivy

There is a newer version: 0.2.70
Show newest version
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 + '\'' +
                    '}';
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy