Actually, I see now that it's only an internal type and it's not currently used for the locateApplicationContexts(ModuleType type) method, so parameterizing the Resource type might be overkill. However, I'm typically wary of assumptions like this - I realize the arg is expected to be the result of a call to another method that currently returns Resource instances that are of type NamedByteArrayResource, but someone could make changes in the future that break that implicit "contract".

I did experiment with the parameterization, but see if you agree that it's overkill:
https://github.com/markfisher/spring-xd/commit/46da74e0862a48906c5f50b406f1cbc0547ec56f

One other thing I noticed that is a bit odd is the naming. AbstractModuleRegistry has two subclasses, which are themsevles siblings: ResourceModuleRegistry and RedisModuleRegistry. However, they both actually return Resource (where the Redis-based one generates ByteArrayResource instances), and the AbstractModuleRegistry has Resource in several method signatures. So, it doesn't seem like "Resource" is a differentiating adjective for the ResourceModuleRegistry.