blob: 75793a4809234b9a23dc04a0aab7bc8586d73df7 [file] [log] [blame]
/**
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
* generated from AuthoritarionDSL.xcore
*
*
*/
package org.eclipse.osbp.xtext.authorizationdsl.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.osbp.dsl.semantic.common.types.LLazyResolver;
import org.eclipse.osbp.dsl.semantic.common.types.LPackage;
import org.eclipse.osbp.xtext.authorizationdsl.*;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> 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.
* <!-- end-user-doc -->
* @see org.eclipse.osbp.xtext.authorizationdsl.AuthorizationDSLPackage
* @generated
*/
public class AuthorizationDSLSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static AuthorizationDSLPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AuthorizationDSLSwitch() {
if (modelPackage == null) {
modelPackage = AuthorizationDSLPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case AuthorizationDSLPackage.AUTHORIZATION_MODEL: {
AuthorizationModel authorizationModel = (AuthorizationModel)theEObject;
T result = caseAuthorizationModel(authorizationModel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.AUTHORIZATION_LAZY_RESOLVER: {
AuthorizationLazyResolver authorizationLazyResolver = (AuthorizationLazyResolver)theEObject;
T result = caseAuthorizationLazyResolver(authorizationLazyResolver);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.AUTHORIZATION_PACKAGE: {
AuthorizationPackage authorizationPackage = (AuthorizationPackage)theEObject;
T result = caseAuthorizationPackage(authorizationPackage);
if (result == null) result = caseLPackage(authorizationPackage);
if (result == null) result = caseLLazyResolver(authorizationPackage);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.AUTHORIZATION_BASE: {
AuthorizationBase authorizationBase = (AuthorizationBase)theEObject;
T result = caseAuthorizationBase(authorizationBase);
if (result == null) result = caseAuthorizationLazyResolver(authorizationBase);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE: {
Role role = (Role)theEObject;
T result = caseRole(role);
if (result == null) result = caseAuthorizationBase(role);
if (result == null) result = caseAuthorizationLazyResolver(role);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_ELEMENT: {
RoleElement roleElement = (RoleElement)theEObject;
T result = caseRoleElement(roleElement);
if (result == null) result = caseAuthorizationLazyResolver(roleElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_ENTITY: {
RoleEntity roleEntity = (RoleEntity)theEObject;
T result = caseRoleEntity(roleEntity);
if (result == null) result = caseRoleElement(roleEntity);
if (result == null) result = caseAuthorizationLazyResolver(roleEntity);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_BEAN: {
RoleBean roleBean = (RoleBean)theEObject;
T result = caseRoleBean(roleBean);
if (result == null) result = caseRoleElement(roleBean);
if (result == null) result = caseAuthorizationLazyResolver(roleBean);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_DTO: {
RoleDto roleDto = (RoleDto)theEObject;
T result = caseRoleDto(roleDto);
if (result == null) result = caseRoleElement(roleDto);
if (result == null) result = caseAuthorizationLazyResolver(roleDto);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_BLIP_ALL_USER_TASKS: {
RoleBlipAllUserTasks roleBlipAllUserTasks = (RoleBlipAllUserTasks)theEObject;
T result = caseRoleBlipAllUserTasks(roleBlipAllUserTasks);
if (result == null) result = caseRoleElement(roleBlipAllUserTasks);
if (result == null) result = caseAuthorizationLazyResolver(roleBlipAllUserTasks);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_BLIP_USER_TASK: {
RoleBlipUserTask roleBlipUserTask = (RoleBlipUserTask)theEObject;
T result = caseRoleBlipUserTask(roleBlipUserTask);
if (result == null) result = caseRoleElement(roleBlipUserTask);
if (result == null) result = caseAuthorizationLazyResolver(roleBlipUserTask);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_BLIP_PROCESS: {
RoleBlipProcess roleBlipProcess = (RoleBlipProcess)theEObject;
T result = caseRoleBlipProcess(roleBlipProcess);
if (result == null) result = caseRoleElement(roleBlipProcess);
if (result == null) result = caseAuthorizationLazyResolver(roleBlipProcess);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_ENTITY_FEATURE: {
RoleEntityFeature roleEntityFeature = (RoleEntityFeature)theEObject;
T result = caseRoleEntityFeature(roleEntityFeature);
if (result == null) result = caseAuthorizationLazyResolver(roleEntityFeature);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_ENTITY_ATTRIBUTE: {
RoleEntityAttribute roleEntityAttribute = (RoleEntityAttribute)theEObject;
T result = caseRoleEntityAttribute(roleEntityAttribute);
if (result == null) result = caseRoleEntityFeature(roleEntityAttribute);
if (result == null) result = caseAuthorizationLazyResolver(roleEntityAttribute);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_ENTITY_REFERENCE: {
RoleEntityReference roleEntityReference = (RoleEntityReference)theEObject;
T result = caseRoleEntityReference(roleEntityReference);
if (result == null) result = caseRoleEntityFeature(roleEntityReference);
if (result == null) result = caseAuthorizationLazyResolver(roleEntityReference);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_BEAN_FEATURE: {
RoleBeanFeature roleBeanFeature = (RoleBeanFeature)theEObject;
T result = caseRoleBeanFeature(roleBeanFeature);
if (result == null) result = caseAuthorizationLazyResolver(roleBeanFeature);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_BEAN_ATTRIBUTE: {
RoleBeanAttribute roleBeanAttribute = (RoleBeanAttribute)theEObject;
T result = caseRoleBeanAttribute(roleBeanAttribute);
if (result == null) result = caseRoleBeanFeature(roleBeanAttribute);
if (result == null) result = caseAuthorizationLazyResolver(roleBeanAttribute);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_BEAN_REFERENCE: {
RoleBeanReference roleBeanReference = (RoleBeanReference)theEObject;
T result = caseRoleBeanReference(roleBeanReference);
if (result == null) result = caseRoleBeanFeature(roleBeanReference);
if (result == null) result = caseAuthorizationLazyResolver(roleBeanReference);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_DTO_FEATURE: {
RoleDtoFeature roleDtoFeature = (RoleDtoFeature)theEObject;
T result = caseRoleDtoFeature(roleDtoFeature);
if (result == null) result = caseAuthorizationLazyResolver(roleDtoFeature);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_DTO_ATTRIBUTE: {
RoleDtoAttribute roleDtoAttribute = (RoleDtoAttribute)theEObject;
T result = caseRoleDtoAttribute(roleDtoAttribute);
if (result == null) result = caseRoleDtoFeature(roleDtoAttribute);
if (result == null) result = caseAuthorizationLazyResolver(roleDtoAttribute);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AuthorizationDSLPackage.ROLE_DTO_REFERENCE: {
RoleDtoReference roleDtoReference = (RoleDtoReference)theEObject;
T result = caseRoleDtoReference(roleDtoReference);
if (result == null) result = caseRoleDtoFeature(roleDtoReference);
if (result == null) result = caseAuthorizationLazyResolver(roleDtoReference);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Authorization Model</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Authorization Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAuthorizationModel(AuthorizationModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Authorization Lazy Resolver</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Authorization Lazy Resolver</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAuthorizationLazyResolver(AuthorizationLazyResolver object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Authorization Package</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Authorization Package</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAuthorizationPackage(AuthorizationPackage object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Authorization Base</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Authorization Base</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAuthorizationBase(AuthorizationBase object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRole(Role object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleElement(RoleElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Entity</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Entity</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleEntity(RoleEntity object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Bean</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Bean</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleBean(RoleBean object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Dto</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Dto</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleDto(RoleDto object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Blip All User Tasks</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Blip All User Tasks</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleBlipAllUserTasks(RoleBlipAllUserTasks object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Blip User Task</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Blip User Task</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleBlipUserTask(RoleBlipUserTask object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Blip Process</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Blip Process</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleBlipProcess(RoleBlipProcess object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Entity Feature</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Entity Feature</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleEntityFeature(RoleEntityFeature object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Entity Attribute</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Entity Attribute</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleEntityAttribute(RoleEntityAttribute object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Entity Reference</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Entity Reference</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleEntityReference(RoleEntityReference object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Bean Feature</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Bean Feature</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleBeanFeature(RoleBeanFeature object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Bean Attribute</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Bean Attribute</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleBeanAttribute(RoleBeanAttribute object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Bean Reference</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Bean Reference</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleBeanReference(RoleBeanReference object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Dto Feature</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Dto Feature</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleDtoFeature(RoleDtoFeature object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Dto Attribute</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Dto Attribute</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleDtoAttribute(RoleDtoAttribute object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Role Dto Reference</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Role Dto Reference</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRoleDtoReference(RoleDtoReference object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>LLazy Resolver</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>LLazy Resolver</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLLazyResolver(LLazyResolver object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>LPackage</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>LPackage</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLPackage(LPackage object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //AuthorizationDSLSwitch