use of com.blazebit.persistence.view.impl.ScalarTargetResolvingExpressionVisitor.TargetType in project blaze-persistence by Blazebit.
the class AbstractAttribute method typeCompatibilityError.
private static String typeCompatibilityError(List<TargetType> possibleTargets, Class<?> targetType, Class<?> targetElementType, ExpressionLocation expressionLocation, String location) {
StringBuilder sb = new StringBuilder();
sb.append("The resolved possible types ");
sb.append('[');
for (TargetType t : possibleTargets) {
sb.append(t.getLeafBaseClass().getName());
if (t.getLeafBaseValueClass() != null && t.getLeafBaseClass() != t.getLeafBaseValueClass()) {
sb.append('<');
sb.append(t.getLeafBaseValueClass().getName());
sb.append('>');
}
sb.append(", ");
}
sb.setLength(sb.length() - 2);
sb.append(']');
sb.append(" are not assignable to the given expression type '");
sb.append(targetType.getName());
if (targetElementType != null && targetElementType != targetType) {
sb.append('<');
sb.append(targetElementType.getName());
sb.append('>');
}
sb.append("' of the ");
sb.append(expressionLocation);
sb.append(" declared by the ");
sb.append(location);
sb.append("!");
return sb.toString();
}
Aggregations