private static <T> Type<T> makeCompoundTypeCore(final Type<T> baseType, final TypeList interfaces) { if (baseType.isGenericParameter()) { throw Error.compoundTypeMayNotHaveGenericParameterBound(); } for (int i = 0, n = interfaces.size(); i < n; i++) { final Type type = interfaces.get(i); if (type.isGenericParameter()) { throw Error.compoundTypeMayNotHaveGenericParameterBound(); } if (!type.isInterface()) { throw Error.compoundTypeMayOnlyHaveOneClassBound(); } } return new CompoundType<>(interfaces, baseType); }
private static <T> Type<T> makeCompoundTypeCore(final Type<T> baseType, final TypeList interfaces) { if (baseType.isGenericParameter()) { throw Error.compoundTypeMayNotHaveGenericParameterBound(); } for (int i = 0, n = interfaces.size(); i < n; i++) { final Type type = interfaces.get(i); if (type.isGenericParameter()) { throw Error.compoundTypeMayNotHaveGenericParameterBound(); } if (!type.isInterface()) { throw Error.compoundTypeMayOnlyHaveOneClassBound(); } } return new CompoundType<>(interfaces, baseType); }
private static <T> Type<T> makeCompoundTypeCore(final Type<T> baseType, final TypeList interfaces) { if (baseType.isGenericParameter()) { throw Error.compoundTypeMayNotHaveGenericParameterBound(); } for (int i = 0, n = interfaces.size(); i < n; i++) { final Type type = interfaces.get(i); if (type.isGenericParameter()) { throw Error.compoundTypeMayNotHaveGenericParameterBound(); } if (!type.isInterface()) { throw Error.compoundTypeMayOnlyHaveOneClassBound(); } } return new CompoundType<>(interfaces, baseType); }