Not possible directly.
But any way if that class is providing all its code as string through toString method then you can print.