Nothing in the Analects claims Confucius wrote it, and its own form rules that out: he is referred to in the third person, his death is reported, and disciples are given honorifics they would not have used of themselves. The text was compiled after 479 BCE by disciples and then by their disciples, and the process ran for well over a century.
The layering is visible without any special apparatus. The middle books tend to be terse and concrete; several of the later ones are longer, more discursive, and interested in cosmological or bureaucratic questions that the earlier material ignores. Book ten is almost entirely a description of ritual deportment, quite unlike anything around it. Books sixteen to twenty are widely regarded as the latest stratum and are the least likely to preserve anything close to the man's own words. Scholars from the Song dynasty onwards noticed the seams, and modern analysis, notably the stratification proposed by E. Bruce and A. Taeko Brooks, has pushed the argument much further, though their detailed chronology is contested and no reconstruction commands general assent.
Manuscript evidence begins with the bamboo Analects excavated in 1973 from a Han tomb at Dingzhou in Hebei, whose occupant died in 55 BCE. More than six hundred slips survived, damaged by a fire set by tomb robbers and then by the Tangshan earthquake of 1976, and the transcription was not published until 1997. It is the oldest known copy. It differs from the received text in wording at many points and in the arrangement of some passages, but the book it contains is recognisably the same book, which tells against any theory of drastic later rewriting.