A small child is lost in a dark forest at night. He hears a wolf howl and says out loud, "I'm not afraid."
The key here is that the true meaning is unintentionally conveyed. The child is afraid, but thinks he isn't supposed to be, which is why he felt the need to say out loud that he was not.
I understand it's a form of irony, but I feel as if irony requires either (1) intent of the speaker or (2) a detached observer's perspective. If the child had said, "what a cheery place this is," that would be irony/sarcasm, because the child is intentionally saying the opposite of what he means. An author writing this scene in a story might consider it irony in the literary sense.
But the child speaking the words in real life doesn't intend them as irony, and may not even realize the irony after he has spoken. Is that still irony? It feels like a different phenomenon to me, somehow.
It's not apophasis. That's when you intentionally raise a subject by denying it, like: "I won't make age an issue in this campaign."
And it's not antiphrasis. That too implies intent: "Take your time, we've got all day."
Thoughts?