You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can remove the U parameter by including a type constructor Aud inside of the Auditor trait. If we retain N and B, the output of the auditor is still well typed. If we have the MorphableAuditor passed to the factory still used as the auditor for the top-level models produced by the factories, we still get back the nice values we want. We can still do things like DefaultValueAuditors (see below in the code). The nice thing is that the Scala-specific features (i.e., type constructors, Aux pattern) are only used by Scala code. Therefore, we can instantiate the stuff from Java just fine in a type-safe way. If we make changeType package private to aloha, which is fine since it's only to be used by the factory, then we should be fine.
Explore this more, but to get started in the meantime ...
This Will Require a Major Version Change!
But It's Probably Worth It!
We can remove the
U
parameter by including a type constructorAud
inside of theAuditor
trait. If we retainN
andB
, the output of the auditor is still well typed. If we have theMorphableAuditor
passed to the factory still used as the auditor for the top-level models produced by the factories, we still get back the nice values we want. We can still do things likeDefaultValueAuditors
(see below in the code). The nice thing is that the Scala-specific features (i.e., type constructors,Aux
pattern) are only used by Scala code. Therefore, we can instantiate the stuff from Java just fine in a type-safe way. If we makechangeType
package private toaloha
, which is fine since it's only to be used by the factory, then we should be fine.Explore this more, but to get started in the meantime ...
Option Auditor
Tree Auditor
Covariance of
A
is required for this to work.Default Value Auditor
Provides a default value that is injected on failure.
Calling Code
Must use original auditor, not one from changeType for auditing the top-level model output
The text was updated successfully, but these errors were encountered: