INNER CODE UNIT · Java

toClass

scalecube/scalecube-services · services-api/src/main/java/io/scalecube/services/Reflect.java:181

  public static Class<?> toClass(Type type) {
    if (type instanceof ParameterizedType pt) {
      return (Class<?>) pt.getRawType();
    }
    if (type instanceof Class<?> c) {
      return c;
    }
    return null;
  }

  /**
   * Extracts service name from service interface.
   *
   * @param serviceInterface serviceInterface with {@link Service} annotation
   * @return service name
   */
  public static String serviceName(Class<?> serviceInterface) {
    // Service name

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…