I would like to write a method that would return a java.util.List of any type without the need to typecast anything:
java.util.List
List
You can simply cast to List and then check if every element can be casted to T.
public List asList(final Class clazz) { List values = (List) this.value; values.forEach(clazz::cast); return values; }