use of org.apache.aries.blueprint.container.GenericType.BoundType in project aries by apache.
the class AggregateConverter method isWildcardCompatible.
private static boolean isWildcardCompatible(ReifiedType from, ReifiedType to) {
BoundType fromBoundType = GenericType.boundType(from);
BoundType toBoundType = GenericType.boundType(to);
if (toBoundType == BoundType.Extends) {
return fromBoundType != BoundType.Super && isTypeAssignable(from, GenericType.bound(to));
} else if (toBoundType == BoundType.Super) {
return fromBoundType != BoundType.Extends && isTypeAssignable(GenericType.bound(to), from);
} else {
return fromBoundType == BoundType.Exact && GenericType.bound(from).equals(GenericType.bound(to));
}
}
Aggregations