In the early twentieth century, George Bernard Shaw took on the “frightful responsibility” of composing a Don Juan play. His immediate sources were “a very great play” (Moliere’s Dom Juan), and “a very great opera” (Mozart’s Don Giovanni). But he understood that the spirit of the Spanish hero is that of a mythological trickster.
In a brief exegesis of the first Don Juan play (El burlador de Sevilla by Tirso de Molina, 1583-1648), Shaw explained:
The prototypic Don Juan … was presented, according to the ideas of that time, as the enemy of God, the approach of whose vengeance is felt throughout the drama, growing in menace from minute to minute. 
Shaw rejects the notion of Don Juan as a vulgar “libertine,” and makes clear in Man and Superman that his John Tanner (Juan Tenorio) is one “in the philosophic sense”:
Don Juan is a man who, though gifted enough to be exceptionally capable of distinguishing between good and evil, follows his own instincts without regard to the common, statute, or canon law; and therefore, whilst gaining the ardent sympathy of our rebellious instincts … finds himself in mortal conflict with existing institutions.