Getting fields from class code