Because of the type parameterization on {{Mutability}} and {{ImmutableMutabilityPlan}}:
{noformat}public @interface Mutability { Class<? extends MutabilityPlan<?>> value(); }
public class ImmutableMutabilityPlan<T> implements MutabilityPlan<T> { ... }{noformat}
The following will give compile errors (Java generics ftw!):
{noformat}@Mutability(ImmutableMutabilityPlan.class){noformat}
Create a non-type-parameterized version:
{noformat}public class Immutability implements MutabilityPlan<Object> { }{noformat}
And then this works:
{noformat}@Mutability(Immutability.class){noformat} |
|