Open shaddysignal opened 9 years ago
I think call with explicit parameter should surpass alias in annotation
Behavior for ModelFactory#createModel
, I assume should be:
erectors
, throw exception if that alias for class not exist.erectors
by default alias, throw exception if that alias for class not exist.Unfortunetly, problem arise when there is no default Erector
, but registered Erector
for class. Would be nice if we can determine that, in nicely done snippet. I can come up with checking all keys, which I assume would be Pair<String, Class>
, but then what to do when there multiple Erector
s for one class.
Example:
That will allow to create single factory for multiple cases, when we need to create different instances of one class. Also, it seems that
@Mapped
,@MappedList
,@MappedSet
,@Blueprint
andaddPolicy
should also be modified for new functionality.