~jameinel/juju-core/api-registry-tracks-type

Viewing all changes in revision 2716.

  • Committer: John Arbash Meinel
  • Date: 2014-05-11 12:06:04 UTC
  • Revision ID: john@arbash-meinel.com-20140511120604-vzilvr0ghstor94k
Create a registry.TypedNameVersion type.

This is meant as a generic Registry implementation, though the Typed
code allows you to ensure that the types of things registered exactly
match what you want.
We use ConvertibleTo and do the Convert internally, which allows you
to specify a named type for your interface, but pass in things
without having to actually cast them ahead of time.

Needs a bit more refinement, but should allow us an easy way to
have a generic Registry while still preserving the Types that we
care about.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: