recursive extract custom class.