org.qi4j.api.composite
Class AmbiguousTypeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.qi4j.api.mixin.MixinMappingException
org.qi4j.api.composite.AmbiguousTypeException
- All Implemented Interfaces:
- Serializable
public class AmbiguousTypeException
- extends MixinMappingException
This Exception is thrown when more than one Composite implements a MixinType
that one tries to use to create a Composite instance from.
For instance;
public interface AbcComposite extends TransientComposite, Abc
{}
public interface DefComposite extends TransientComposite, Def
{}
public interface Abc
{}
public interface Def extends Abc
{}
TransientBuilder cb = factory.newTransientBuilder( Abc.class );
In the code above, both the AbcComposite and DefComposite implement Abc, and therefore
the newTransientBuilder
method can not unambiguously figure out which
one is intended.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
AmbiguousTypeException
public AmbiguousTypeException(Class<?> mixinType,
Class<?>... matchingTypes)
AmbiguousTypeException
public AmbiguousTypeException(Class<?> mixinType,
Iterable<Class<?>> matchingTypes)
mixinType
public Class<?> mixinType()
matchingTypes
public Iterable<Class<?>> matchingTypes()