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

io.yawp.commons.utils.kind.DefaultKindResolver Maven / Gradle / Ivy

There is a newer version: 2.08alpha
Show newest version
package io.yawp.commons.utils.kind;

import io.yawp.repository.annotations.Endpoint;

public class DefaultKindResolver extends KindResolver {

	@Override
	public String getKind(Class clazz) {
		Endpoint endpoint = clazz.getAnnotation(Endpoint.class);
		if (endpoint.path() == null) {
			return clazz.getSimpleName();
		}
		return endpoint.path().substring(1);
	}

	@Override
	public String getPath(String kind) {
		return "/" + kind;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy