Extract from all the files parts of code that look like class<something but not }>{<something perhaps containing nested {}>}
and eval all of those pieces of code.
I guess you will have to determine specific order in which to eval them (you might take a note which files include which to determine this order, or take a look at extends
and implements
)
Then use reflection.