Embedded class declaration

What’s the effect of a class defined within class definition body (eg DataMessage in the MessageManager library class) ? Is it restricting the scope of the embedded class so that it can only be instantiated by methods within the ‘parent’ class ?