In English (and, I assume, its relatives), there is a style of narration called free indirect speech, some examples of which are given in the linked article.
I'm having trouble figuring out whether or not Japanese supports something similar. Clearly, Japanese has direct speech (直接話法):
A: それはリンゴだ。
B: 「それはリンゴだ」とAは言った。
Japanese also has some sort of indirect/reported speech (間接話法):
A: それはリンゴだ。
B: Aによると、それはリンゴだそうだ。
Can Japanese do free indirect speech (自由間接話法, I guess)? What would that look like? I get the feeling that Japanese might not have a strong distinction between free and ordinary indirect speech, but am having trouble figuring out what the correct mapping between English indirect speech and Japanese indirect speech is.