For the record, your app could write the necessary source code, send it to
the compiler, load it using a custom classloader, and then create instances.
But why do you need to do this?
As Jasper implies, your static code has no way of referring to a
dynamically created type and its members, except where it extends a
previously known static type.
A straight-forward technique would be to have a trait A in your code and
then you dynamically create a new class B that extends A, then create an
instance of B (which initially will have an AnyRef reference) and cast it
to A and use members of A.
But do you really need this or could you just use a List[Any] or