private void visitNumCast(List<? extends Expression<?>> args) {
        @SuppressWarnings("unchecked") //this is the second argument's type
        Constant<Class<?>> rightArg = (Constant<Class<?>>) args.get(1);

        final Class<?> targetType = rightArg.getConstant();
        final String typeName = templates.getTypeForCast(targetType);
        visitOperation(targetType, JPQLOps.CAST, Arrays.asList(args.get(0), ConstantImpl.create(typeName)));
    }
{@code JPQLSerializer} serializes Querydsl expressions into JPQL syntax.

@author tiwe
querydsl-jpa/src/main/java/com/querydsl/jpa/JPQLSerializer.java