=begin pod

=TITLE role Metamodel::PrivateMethodContainer

=SUBTITLE Metaobject that supports private methods

    role Metamodel::PrivateMethodContainer { ... }

In Perl 6, classes, roles and grammars can have private methods, that is,
methods that are only callable from within the class, and are not inherited to
types derived by inheritance.

    class A {
        # the ! declares a private method
        method !double($x) {
            say 2 * $x;
        }
        method call-double($y) {
            # call with ! instead of .
            self!double($y);
        }
    }

For the purposes of dispatching and scoping, private methods are closer
to subroutines than to methods. However they share access to C<self> and
attributes with methods.

=head1 Methods

=head2 method add_private_method

    method add_private_method(Metamodel::PrivateMethodContainer: $obj, $name, $code)

Adds a private method C<$code> with name C<$name>.

=head2 method private_method_table

    method private_method_table(Metamodel::PrivateMethodContainer: $obj)

Returns a hash of C«name => &method_object»

=begin comment

TODO: document find_private_method, once we've figured out how to represent
or catch nqp::null in Perl 6 land

=end comment

=end pod
