Class MeasurementsSwitch<T>

  • Type Parameters:
    T -
    Direct Known Subclasses:
    AlternativeMeasuringPointChildrenSwitch, ChooseMeasuringPointMessageSwitch, CreateMeasuringPointSwitch, ImageProviderSwitch, TextProviderSwitch

    public class MeasurementsSwitch<T>
    extends Object
    An adapted version of a switch class. It behaves similar to proper switch classes, but it doesn't call any other Switch-classes. It uses instanceof to differentiate between all cases, because there is no other possibility to differentiate between the used models. The models come from different ePackages, so they all have their own proper Switch-class. Some models don't have any Switch-class at all. The common superclass of all classes combined is eObject, so there is no common value you could use to implement a proper emf switch class. Alternatively you could use the EObjects classifierId, but it changes at runtime, so this is can not be used as a proper switch implementation, too.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T caseAssemblyContext​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext)
      The case for assembly contexts.
      T caseBasicComponent​(org.palladiosimulator.pcm.repository.BasicComponent basicComponent)
      The case for basic components.
      T caseBranch​(org.palladiosimulator.pcm.usagemodel.Branch branch)
      The case for branches.
      T caseBranchTransition​(org.palladiosimulator.pcm.usagemodel.BranchTransition branchTransition)
      The case for branch transitions.
      T caseEntryLevelSystemCall​(org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall entryLevelSystemCall)
      The case for entry level system calls.
      T caseExternalCallAction​(org.palladiosimulator.pcm.seff.ExternalCallAction externalCallAction)
      The case for external call actions.
      T caseLinkingResource​(org.palladiosimulator.pcm.resourceenvironment.LinkingResource linkingResource)
      The case for linking resources.
      T caseLoop​(org.palladiosimulator.pcm.usagemodel.Loop loop)
      The case for loops.
      T caseMeasuringPoint​(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringpoint)
      The case for measuringpoints.
      T caseOperationSignature​(org.palladiosimulator.pcm.repository.OperationSignature operationSignature)
      The case for operation signatures.
      T casePassiveResource​(org.palladiosimulator.pcm.repository.PassiveResource passiveResource)
      The case for passive resources.
      T caseProcessingResourceSpecification​(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification processingResourceSpecification)
      The case for processing resource specifications.
      T caseRepository​(org.palladiosimulator.pcm.repository.Repository repository)
      The case for repositories.
      T caseResourceContainer​(org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer)
      The case for resource containers.
      T caseResourceDemandingSEFF​(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF resourceDemandingSeff)
      The case for resource demanding SEFFs.
      T caseResourceEnvironment​(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment resourceEnvironment)
      The case for resource environments.
      T caseRole​(org.palladiosimulator.pcm.repository.Role role)
      The case for roles.
      T caseScenarioBehaviour​(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour scenarioBehaviour)
      The case for scenario behaviours.
      T caseSubSystem​(org.palladiosimulator.pcm.subsystem.SubSystem subSystem)
      The case for subsystems.
      T caseSystem​(org.palladiosimulator.pcm.system.System system)
      The case for systems.
      T caseUsageModel​(org.palladiosimulator.pcm.usagemodel.UsageModel usageModel)
      The case for usage models.
      T caseUsageScenario​(org.palladiosimulator.pcm.usagemodel.UsageScenario usageScenario)
      The case for usage scenarios.
      T defaultCase​(EObject eObject)
      The default case.
      T doSwitch​(EObject theEObject)
      the "switch"-method of this "switch".
    • Constructor Detail

      • MeasurementsSwitch

        public MeasurementsSwitch()
    • Method Detail

      • doSwitch

        public T doSwitch​(EObject theEObject)
        the "switch"-method of this "switch". It checks, which object is passed and calls the fitting caseXXX method. It can differentiate between all the models, which are used in the measurementsui.
        Parameters:
        theEObject - the object to determine its class to
        Returns:
        T an object which you can specify when inheriting from this class
      • caseMeasuringPoint

        public T caseMeasuringPoint​(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringpoint)
        The case for measuringpoints. You should override it and add your own logic before using the switch.
        Parameters:
        measuringpoint - the given measuringpoint
        Returns:
        T
      • caseResourceDemandingSEFF

        public T caseResourceDemandingSEFF​(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF resourceDemandingSeff)
        The case for resource demanding SEFFs. You should override it and add your own logic before using the switch.
        Parameters:
        resourceDemandingSeff - the given resource demanding SEFF
        Returns:
        T
      • caseUsageModel

        public T caseUsageModel​(org.palladiosimulator.pcm.usagemodel.UsageModel usageModel)
        The case for usage models. You should override it and add your own logic before using the switch.
        Parameters:
        usageModel - the given usage model
        Returns:
        T
      • caseBasicComponent

        public T caseBasicComponent​(org.palladiosimulator.pcm.repository.BasicComponent basicComponent)
        The case for basic components. You should override it and add your own logic before using the switch.
        Parameters:
        basicComponent - the given basic component
        Returns:
        T
      • caseScenarioBehaviour

        public T caseScenarioBehaviour​(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour scenarioBehaviour)
        The case for scenario behaviours. You should override it and add your own logic before using the switch.
        Parameters:
        scenarioBehaviour - the given scenario behaviour
        Returns:
        T
      • caseRepository

        public T caseRepository​(org.palladiosimulator.pcm.repository.Repository repository)
        The case for repositories. You should override it and add your own logic before using the switch.
        Parameters:
        repository - the given repository
        Returns:
        T
      • caseBranchTransition

        public T caseBranchTransition​(org.palladiosimulator.pcm.usagemodel.BranchTransition branchTransition)
        The case for branch transitions. You should override it and add your own logic before using the switch.
        Parameters:
        branchTransition - the given branch transition
        Returns:
        T
      • caseLoop

        public T caseLoop​(org.palladiosimulator.pcm.usagemodel.Loop loop)
        The case for loops. You should override it and add your own logic before using the switch.
        Parameters:
        loop - the given loop
        Returns:
        T
      • caseBranch

        public T caseBranch​(org.palladiosimulator.pcm.usagemodel.Branch branch)
        The case for branches. You should override it and add your own logic before using the switch.
        Parameters:
        branch - the given branch
        Returns:
        T
      • caseUsageScenario

        public T caseUsageScenario​(org.palladiosimulator.pcm.usagemodel.UsageScenario usageScenario)
        The case for usage scenarios. You should override it and add your own logic before using the switch.
        Parameters:
        usageScenario - the given usage scenario
        Returns:
        T
      • caseSystem

        public T caseSystem​(org.palladiosimulator.pcm.system.System system)
        The case for systems. You should override it and add your own logic before using the switch.
        Parameters:
        system - the given system
        Returns:
        T
      • caseSubSystem

        public T caseSubSystem​(org.palladiosimulator.pcm.subsystem.SubSystem subSystem)
        The case for subsystems. You should override it and add your own logic before using the switch.
        Parameters:
        subSystem - the given subsystem
        Returns:
        T
      • caseResourceEnvironment

        public T caseResourceEnvironment​(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment resourceEnvironment)
        The case for resource environments. You should override it and add your own logic before using the switch.
        Parameters:
        resourceEnvironment - the given resource environment
        Returns:
        T
      • caseLinkingResource

        public T caseLinkingResource​(org.palladiosimulator.pcm.resourceenvironment.LinkingResource linkingResource)
        The case for linking resources. You should override it and add your own logic before using the switch.
        Parameters:
        linkingResource - the given linking resource
        Returns:
        T
      • caseExternalCallAction

        public T caseExternalCallAction​(org.palladiosimulator.pcm.seff.ExternalCallAction externalCallAction)
        The case for external call actions. You should override it and add your own logic before using the switch.
        Parameters:
        externalCallAction - the given external call action
        Returns:
        T
      • caseEntryLevelSystemCall

        public T caseEntryLevelSystemCall​(org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall entryLevelSystemCall)
        The case for entry level system calls. You should override it and add your own logic before using the switch.
        Parameters:
        entryLevelSystemCall - the given entry level system call
        Returns:
        T
      • caseRole

        public T caseRole​(org.palladiosimulator.pcm.repository.Role role)
        The case for roles. You should override it and add your own logic before using the switch.
        Parameters:
        role - the given role
        Returns:
        T
      • caseOperationSignature

        public T caseOperationSignature​(org.palladiosimulator.pcm.repository.OperationSignature operationSignature)
        The case for operation signatures. You should override it and add your own logic before using the switch.
        Parameters:
        operationSignature - the given operation signature
        Returns:
        T
      • casePassiveResource

        public T casePassiveResource​(org.palladiosimulator.pcm.repository.PassiveResource passiveResource)
        The case for passive resources. You should override it and add your own logic before using the switch.
        Parameters:
        passiveResource - the given passive resource
        Returns:
        T
      • caseAssemblyContext

        public T caseAssemblyContext​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext)
        The case for assembly contexts. You should override it and add your own logic before using the switch.
        Parameters:
        assemblyContext - the given assembly context
        Returns:
        T
      • caseProcessingResourceSpecification

        public T caseProcessingResourceSpecification​(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification processingResourceSpecification)
        The case for processing resource specifications. You should override it and add your own logic before using the switch.
        Parameters:
        processingResourceSpecification - the given processing resource specification
        Returns:
        T
      • caseResourceContainer

        public T caseResourceContainer​(org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer)
        The case for resource containers. You should override it and add your own logic before using the switch.
        Parameters:
        resourceContainer - the given resource container
        Returns:
        T
      • defaultCase

        public T defaultCase​(EObject eObject)
        The default case. You should override it and add your own logic before using the switch.
        Parameters:
        eObject - the given EObject
        Returns:
        T