role Metamodel::RoleContainer

Metaobject that supports holding/containing roles

role Metamodel::RoleContainer {}

Warning: this role is part of the Rakudo implementation, and is not a part of the language specification.

Implements the ability to hold roles to be held for composition.

class A does SomeRole {}

roughly corresponds to

class A {
    BEGIN A.^add_role(SomeRole);
}

Methods

method add_role

method add_role(Metamodel::RoleContainer:D: $objMu $role)

Adds the $role to the list of roles to be composed.

method roles_to_compose

method roles_to_compose(Metamodel::RoleContainer:D: $obj --> List:D)

returns a list of roles added with add_role, which are to be composed at type composition time.

Type Graph

Type relations for Metamodel::RoleContainer
perl6-type-graph Metamodel::RoleContainer Metamodel::RoleContainer Mu Mu Any Any Any->Mu Metamodel::Naming Metamodel::Naming Metamodel::Stashing Metamodel::Stashing Metamodel::AttributeContainer Metamodel::AttributeContainer Metamodel::MethodContainer Metamodel::MethodContainer Metamodel::MultiMethodContainer Metamodel::MultiMethodContainer Metamodel::BaseType Metamodel::BaseType Metamodel::MROBasedMethodDispatch Metamodel::MROBasedMethodDispatch Metamodel::MROBasedTypeChecking Metamodel::MROBasedTypeChecking Metamodel::BUILDPLAN Metamodel::BUILDPLAN Metamodel::BoolificationProtocol Metamodel::BoolificationProtocol Metamodel::Mixins Metamodel::Mixins Metamodel::EnumHOW Metamodel::EnumHOW Metamodel::EnumHOW->Metamodel::RoleContainer Metamodel::EnumHOW->Any Metamodel::EnumHOW->Metamodel::Naming Metamodel::EnumHOW->Metamodel::Stashing Metamodel::EnumHOW->Metamodel::AttributeContainer Metamodel::EnumHOW->Metamodel::MethodContainer Metamodel::EnumHOW->Metamodel::MultiMethodContainer Metamodel::EnumHOW->Metamodel::BaseType Metamodel::EnumHOW->Metamodel::MROBasedMethodDispatch Metamodel::EnumHOW->Metamodel::MROBasedTypeChecking Metamodel::EnumHOW->Metamodel::BUILDPLAN Metamodel::EnumHOW->Metamodel::BoolificationProtocol Metamodel::EnumHOW->Metamodel::Mixins Metamodel::Documenting Metamodel::Documenting Metamodel::Versioning Metamodel::Versioning Metamodel::PrivateMethodContainer Metamodel::PrivateMethodContainer Metamodel::MultipleInheritance Metamodel::MultipleInheritance Metamodel::TypePretense Metamodel::TypePretense Metamodel::RolePunning Metamodel::RolePunning Metamodel::ParametricRoleHOW Metamodel::ParametricRoleHOW Metamodel::ParametricRoleHOW->Metamodel::RoleContainer Metamodel::ParametricRoleHOW->Any Metamodel::ParametricRoleHOW->Metamodel::Naming Metamodel::ParametricRoleHOW->Metamodel::Stashing Metamodel::ParametricRoleHOW->Metamodel::AttributeContainer Metamodel::ParametricRoleHOW->Metamodel::MethodContainer Metamodel::ParametricRoleHOW->Metamodel::MultiMethodContainer Metamodel::ParametricRoleHOW->Metamodel::Documenting Metamodel::ParametricRoleHOW->Metamodel::Versioning Metamodel::ParametricRoleHOW->Metamodel::PrivateMethodContainer Metamodel::ParametricRoleHOW->Metamodel::MultipleInheritance Metamodel::ParametricRoleHOW->Metamodel::TypePretense Metamodel::ParametricRoleHOW->Metamodel::RolePunning Metamodel::Finalization Metamodel::Finalization Metamodel::DefaultParent Metamodel::DefaultParent Metamodel::C3MRO Metamodel::C3MRO Metamodel::Trusting Metamodel::Trusting Metamodel::ClassHOW Metamodel::ClassHOW Metamodel::ClassHOW->Metamodel::RoleContainer Metamodel::ClassHOW->Any Metamodel::ClassHOW->Metamodel::Naming Metamodel::ClassHOW->Metamodel::Stashing Metamodel::ClassHOW->Metamodel::AttributeContainer Metamodel::ClassHOW->Metamodel::MethodContainer Metamodel::ClassHOW->Metamodel::MultiMethodContainer Metamodel::ClassHOW->Metamodel::MROBasedMethodDispatch Metamodel::ClassHOW->Metamodel::MROBasedTypeChecking Metamodel::ClassHOW->Metamodel::BUILDPLAN Metamodel::ClassHOW->Metamodel::BoolificationProtocol Metamodel::ClassHOW->Metamodel::Mixins Metamodel::ClassHOW->Metamodel::Documenting Metamodel::ClassHOW->Metamodel::Versioning Metamodel::ClassHOW->Metamodel::PrivateMethodContainer Metamodel::ClassHOW->Metamodel::MultipleInheritance Metamodel::ClassHOW->Metamodel::Finalization Metamodel::ClassHOW->Metamodel::DefaultParent Metamodel::ClassHOW->Metamodel::C3MRO Metamodel::ClassHOW->Metamodel::Trusting Metamodel::ConcreteRoleHOW Metamodel::ConcreteRoleHOW Metamodel::ConcreteRoleHOW->Metamodel::RoleContainer Metamodel::ConcreteRoleHOW->Any Metamodel::ConcreteRoleHOW->Metamodel::Naming Metamodel::ConcreteRoleHOW->Metamodel::AttributeContainer Metamodel::ConcreteRoleHOW->Metamodel::MethodContainer Metamodel::ConcreteRoleHOW->Metamodel::MultiMethodContainer Metamodel::ConcreteRoleHOW->Metamodel::Versioning Metamodel::ConcreteRoleHOW->Metamodel::PrivateMethodContainer Metamodel::ConcreteRoleHOW->Metamodel::MultipleInheritance

Expand above chart