literalType = Literal.TYPE_STRING;
} else if (Enum.class.isAssignableFrom(literalClass)) {
literalType = Literal.TYPE_ENUM;
} else if (Class.class.isAssignableFrom(literalClass)) {
literalType = Literal.TYPE_CLASS;
Literal lit = factory.newTypeLiteral(value, Literal.TYPE_CLASS);
ClassMetaData can = ((Types.Entity<X>)q.getRoot().getModel()).meta;
Class<?> candidate = can.getDescribedType();
if (candidate.isAssignableFrom((Class)value)) {
lit.setMetaData(q.getMetamodel().getRepository().getMetaData((Class<?>)value, null, true));
} else {
lit.setMetaData(can);
}
return lit;
} else if (Collection.class.isAssignableFrom(literalClass)) {
literalType = Literal.TYPE_COLLECTION;
}