Closed darscan closed 12 years ago
Mmh, I might have to work on my API, then. The injector has the
methods satisfies
and satisfiesDirectly
, the first of which most
likely is what you want to use, whereas the second most likely is what
you'd expect to be using.
The thing is that hasMapping
wouldn't live up to its name if it
returned true if the injector itself or one of its ancestors has a
mapping, but that's what you want to know 99% of the time.
Got any good naming suggestions?
Ah! I didn't see satisfies(). That'll work for me.
Cool. But do you think that I should use a better name for that functionality?
Nope, I like it.
Alright then, documentation it is. Thanks.
How can one query for the existence of a mapping? Calling getMapping() throws and error if no mapping is found. I would expect it to return null, or for a method called hasMapping() to be exposed.