Class PrologSwitch<T>


  • public class PrologSwitch<T>
    extends Switch<T>
    The Switch for the model's inheritance hierarchy. It supports the call doSwitch(object) to invoke the caseXXX method for each class of the model, starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is returned, which is the result of the switch.
    See Also:
    PrologPackage
    Generated class or method.
    • Field Detail

      • modelPackage

        protected static PrologPackage modelPackage
        The cached model package
        Generated class or method.
    • Constructor Detail

      • PrologSwitch

        public PrologSwitch()
        Creates an instance of the switch.
        Generated class or method.
    • Method Detail

      • isSwitchFor

        protected boolean isSwitchFor​(EPackage ePackage)
        Checks whether this is a switch for the given package.
        Specified by:
        isSwitchFor in class Switch<T>
        Parameters:
        ePackage - the package in question.
        Returns:
        whether this is a switch for the given package.
        Generated class or method.
      • doSwitch

        protected T doSwitch​(int classifierID,
                             EObject theEObject)
        Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
        Overrides:
        doSwitch in class Switch<T>
        Returns:
        the first non-null result returned by a caseXXX call.
        Generated class or method.
      • caseProgram

        public T caseProgram​(Program object)
        Returns the result of interpreting the object as an instance of 'Program'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Program'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseClause

        public T caseClause​(Clause object)
        Returns the result of interpreting the object as an instance of 'Clause'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Clause'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseComment

        public T caseComment​(Comment object)
        Returns the result of interpreting the object as an instance of 'Comment'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Comment'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseTerm

        public T caseTerm​(Term object)
        Returns the result of interpreting the object as an instance of 'Term'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Term'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseCompoundTerm

        public T caseCompoundTerm​(CompoundTerm object)
        Returns the result of interpreting the object as an instance of 'Compound Term'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Compound Term'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseAtomicNumber

        public T caseAtomicNumber​(AtomicNumber object)
        Returns the result of interpreting the object as an instance of 'Atomic Number'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Atomic Number'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseAtomicDouble

        public T caseAtomicDouble​(AtomicDouble object)
        Returns the result of interpreting the object as an instance of 'Atomic Double'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Atomic Double'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseAtomicQuotedString

        public T caseAtomicQuotedString​(AtomicQuotedString object)
        Returns the result of interpreting the object as an instance of 'Atomic Quoted String'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Atomic Quoted String'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseList

        public T caseList​(List object)
        Returns the result of interpreting the object as an instance of 'List'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'List'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseFact

        public T caseFact​(Fact object)
        Returns the result of interpreting the object as an instance of 'Fact'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Fact'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseRule

        public T caseRule​(Rule object)
        Returns the result of interpreting the object as an instance of 'Rule'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Rule'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseControlPredicate

        public T caseControlPredicate​(ControlPredicate object)
        Returns the result of interpreting the object as an instance of 'Control Predicate'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Control Predicate'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseTrue

        public T caseTrue​(True object)
        Returns the result of interpreting the object as an instance of 'True'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'True'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseFalse

        public T caseFalse​(False object)
        Returns the result of interpreting the object as an instance of 'False'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'False'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseFail

        public T caseFail​(Fail object)
        Returns the result of interpreting the object as an instance of 'Fail'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Fail'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseCut

        public T caseCut​(Cut object)
        Returns the result of interpreting the object as an instance of 'Cut'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Cut'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • caseExpression

        public T caseExpression​(Expression object)
        Returns the result of interpreting the object as an instance of 'Expression'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Expression'.
        See Also:
        doSwitch(EObject)
        Generated class or method.
      • defaultCase

        public T defaultCase​(EObject object)
        Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway.
        Overrides:
        defaultCase in class Switch<T>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'EObject'.
        See Also:
        Switch.doSwitch(org.eclipse.emf.ecore.EObject)
        Generated class or method.