@SuppressWarnings({"unchecked", "rawtypes"})
    public <T> @NonNull ServicePipeline registerMethods(
            final @NonNull T instance
    ) throws Exception {
        synchronized (this.lock) {
            final Map<? extends Service<?, ?>, TypeToken<? extends Service<?, ?>>> services =
                    AnnotatedMethodServiceFactory.INSTANCE.lookupServices(instance);
            for (final Map.Entry<? extends Service<?, ?>, TypeToken<? extends Service<?, ?>>> serviceEntry : services
                    .entrySet()) {
                final TypeToken<? extends Service<?, ?>> type = serviceEntry.getValue();
                final ServiceRepository<?, ?> repository = this.repositories.get(type.getType());
                if (repository == null) {
                    throw new IllegalArgumentException(
                            String.format("No service registered for type '%s'", type.getType().getTypeName()));
                }
                repository.<Service>registerImplementation(
                        serviceEntry.getKey(),
                        Collections.emptyList()
                );
            }
        }
        return this;
    }
Scan a given class for methods annotated with {@link org.incendo.cloud.services.annotation.ServiceImplementation}
and register them as service implementations.
<p>
The methods should be of the form:
<pre>{@code
@Nullable
@ServiceImplementation(YourService.class)
public YourResult handle(YourContext) {
     return result;
}
}</pre>

@param instance Instance of the class to scan
@param <T>      Type of the instance
@return Service pipeline instance
@throws Exception Any exceptions thrown during the registration process
cloud-services/src/main/java/org/incendo/cloud/services/ServicePipeline.java