# serviceloader

Published articles for serviceloader.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Making ServiceLoader usable: a provider factory

DevFeed: [Making ServiceLoader usable: a provider factory](<https://devfeed.tech/articles/making-serviceloader-usable-a-provider-factory-18932.md>)

Original publisher: [Read original article](<https://blog.frankel.ch/serviceloader-provider-factory/>)

Author: Stefano Fago

Published: 2026-07-12T00:00:00Z

Content type: tutorial

Language: en

Sources: [Nicolas Fränkel](<https://devfeed.tech/sources/nicolas-frankel.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Code](<https://devfeed.tech/topics/code.md>), [JSON Web Tokens](<https://devfeed.tech/topics/jwt.md>), [JSON](<https://devfeed.tech/topics/json.md>)

Tags: [decoupling](<https://devfeed.tech/tags/decoupling.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [java](<https://devfeed.tech/tags/java.md>), [json](<https://devfeed.tech/tags/json.md>), [jwt](<https://devfeed.tech/tags/jwt.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [plugins](<https://devfeed.tech/tags/plugins.md>), [serviceloader](<https://devfeed.tech/tags/serviceloader.md>), [spi](<https://devfeed.tech/tags/spi.md>)

### AI overview

This article presents a provider-factory pattern for Java ServiceLoader. Instead of loading a service implementation directly, ServiceLoader loads a small factory with a no-argument constructor; the factory then constructs the service and can support implementation selection and custom constructors. The pattern is illustrated with a mock payments system and is related to decoupling JSON and JWT capabilities from concrete libraries.

### Source excerpt

I keep coming back to java.util.ServiceLoader. I have used it to put a JSON layer behind a contract, so the core code carries no direct dependency on any particular JSON library, and I can swap the implementation without touching callers. The same shape works for JWT handling, where the concrete library might be jose4j or another JOSE implementation, and you can easily find other decoupling use-cases.

## AutoValue Extensions

DevFeed: [AutoValue Extensions](<https://devfeed.tech/articles/autovalue-extensions-30586.md>)

Original publisher: [Read original article](<https://ryanharter.com/blog/2016/05/autovalue-extensions/>)

Published: 2016-05-16T07:00:00Z

Content type: tutorial

Language: en

Sources: [Blogs on Ryan Harter](<https://devfeed.tech/sources/blogs-on-ryan-harter.md>)

Topics: [Code generation](<https://devfeed.tech/topics/code-generation.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [Code](<https://devfeed.tech/topics/code.md>), [Java](<https://devfeed.tech/topics/java.md>), [serviceloader](<https://devfeed.tech/topics/serviceloader.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>)

Tags: [annotation-processor](<https://devfeed.tech/tags/annotation-processor.md>), [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [extensions](<https://devfeed.tech/tags/extensions.md>), [java](<https://devfeed.tech/tags/java.md>), [maven](<https://devfeed.tech/tags/maven.md>), [serviceloader](<https://devfeed.tech/tags/serviceloader.md>)

### AI overview

This tutorial explains AutoValue Extensions, which extend AutoValue's compile-time generation of immutable Java value types. It describes how extensions add functionality to generated implementations, are discovered through Java ServiceLoader, and can support integrations such as JSON, Protocol Buffers, databases, and Android Parcelable.

### Source excerpt

This is the third article in a series on AutoValue. The first article introduced AutoValue, the code generating annotation processor for value types. The second took a more in depth look at the code generated by AutoValue, and the benefits of compile time code generation. In a previous article introducing AutoValue, I briefly mentioned AutoValue Extensions. Now it's time to go a bit more in depth to look at what extensions are, how they work, and how they can help you get even more out of AutoValue.