Class SourceRoleSelector<T>

  • Type Parameters:
    T - The ConnectorCreator, creating this selector.

    public class SourceRoleSelector<T>
    extends Object
    This class ensures, that a Role is only selected after an AssemblyContext.
    • Constructor Detail

      • SourceRoleSelector

        public SourceRoleSelector​(IContextRoleCombinator<org.palladiosimulator.pcm.repository.SourceRole,​T> combinator,
                                  org.palladiosimulator.pcm.core.composition.AssemblyContext context)
    • Method Detail

      • withSourceRole

        public T withSourceRole​(org.palladiosimulator.pcm.repository.SourceRole role)
        Defines the SourceRole required by the AssemblyContext.
        Parameters:
        role -
        Returns:
        the assembly connector
        See Also:
        SourceRole, AssemblyContext
      • withSourceRole

        public T withSourceRole​(String name)
                         throws NoSuchElementException
        Defines the SourceRole required by the AssemblyContext. The required roles of the context are searched for a role matching the given name.
        Parameters:
        name -
        Returns:
        the assembly connector
        Throws:
        NoSuchElementException - Thrown if no role matches the given name.
        See Also:
        SourceRole, AssemblyContext