INNER CODE UNIT · Java
serviceName
scalecube/scalecube-services · services-api/src/main/java/io/scalecube/services/Reflect.java:197
public static String serviceName(Class<?> serviceInterface) {
// Service name
Service serviceAnnotation = serviceInterface.getAnnotation(Service.class);
if (serviceAnnotation == null) {
throw new IllegalArgumentException("Not a service interface: " + serviceInterface);
}
return serviceAnnotation.value().length() > 0
? serviceAnnotation.value()
: serviceInterface.getName();
}
/**
* Extracts service tags from service interface.
*
* @param serviceInterface serviceInterface with {@link Service} annotation
* @return service tags
*/
public static Map<String, String> serviceTags(Class<?> serviceInterface) {