getOrPut

Retrieves the first ResourcePath the given def is registered under or creates a new ResourcePath using createPath, registers def under it and returns it.