Influenced by the new psychological theories (Freud's psychoanalysis first but also Bergson's time theory, etc. - that opened to a deep analysis of human mind and its deep way of operating-) some authors used to try an objective, amoral, transposition - in a literary language - of the stream of consciousness.
We need first to give a definition of stream of consciousness: it is the technique used to report as objectively as possible the thoughts of the character, the interior sequence (stream, or flow) of thoughts constantly going on in human mind for which - of course - there are no logic constraints or rules.
Our mind doesn't follow rules: thoughts, memories and feelings are conditioned, provoked, awakened in our brain by different situations, events and moments, by the place we are, by the people we talk to and so on. If we were able to write them all down on paper, we would see that they look like a stream. I think you understood what I'm talking about: we can't give a logic, chronological, global scheme of our stream of thoughts.
Joyce works on this technique for long time, elaborating it so much he arrives -passing through The Dubliners and the Ulysses’- to Finnegan's Wake: the recording of pre-sleep thoughts (that is quiet incomprehensible).
We're going to make a brief, technical analysis of the different grammatical ways he used to make this operation: in the Dubliners, in the Ulysses and in Finnegan's Wake.
The stream of consciousness - because of the spontaneous, illogical, non-chronological way the thought appears and disappear in our mind - has an atypical form.
Joyce uses the interior monologue: the character’s consciousness is recreated apparently without any interfering agency. The character’s thoughts are presented directly, imitating as much as possible the character’s mind style. The thoughts are presented in the first person, several thoughts run into each other as perceptions of different things converged in the same point of the mind, syntax and punctuation are not those of the conventional written language, but try to imitate spoken (or thought) language.
The author tries a representation as much objective as possible of the way his character might 'actually' have thought his thoughts.