code: private Object convertToThrift(Class<?> cls)
      {
          Set<ThriftService> serviceAnnotations = ReflectionHelper.getEffectiveClassAnnotations(cls, ThriftService.class);
          if (!serviceAnnotations.isEmpty()) {
              // it's a service
              ThriftServiceMetadata serviceMetadata = new ThriftServiceMetadata(cls, codecManager.getCatalog());
              if (verbose) {
                  LOG.info("Found thrift service: %s", cls.getSimpleName());
              }
              return serviceMetadata;
          } else {
              // it's a type (will throw if it's not)
              ThriftType thriftType = codecManager.getCatalog().getThriftType(cls);
              if (verbose) {
                  LOG.info("Found thrift type: %s", thriftTypeRenderer.toString(thriftType));
              }
              return thriftType;
          }
      }
docs: returns ThriftType, ThriftServiceMetadata or null