Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 62887 invoked from network); 24 Aug 2005 21:40:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Aug 2005 21:40:28 -0000 Received: (qmail 37236 invoked by uid 500); 24 Aug 2005 21:39:15 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 37072 invoked by uid 500); 24 Aug 2005 21:39:13 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 36815 invoked by uid 99); 24 Aug 2005 21:39:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2005 14:39:11 -0700 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 24 Aug 2005 14:38:43 -0700 Received: (qmail 60222 invoked by uid 65534); 24 Aug 2005 21:38:18 -0000 Message-ID: <20050824213818.60221.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r239937 [65/73] - in /geronimo/trunk/sandbox/eclipse-plugin: org.apache.geronimo.core/src/org/apache/geronimo/core/internal/ org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ org.apache.geronimo.deployment.model/src/org/apac... Date: Wed, 24 Aug 2005 21:36:53 -0000 To: scm@geronimo.apache.org From: geirm@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Modified: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/openejb/xml/ns/openejb/jar/util/JarSwitch.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/openejb/xml/ns/openejb/jar/util/JarSwitch.java?rev=239937&r1=239936&r2=239937&view=diff ============================================================================== --- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/openejb/xml/ns/openejb/jar/util/JarSwitch.java (original) +++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/openejb/xml/ns/openejb/jar/util/JarSwitch.java Wed Aug 24 14:34:34 2005 @@ -1,685 +1,685 @@ -/** - * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.openejb.xml.ns.openejb.jar.util; - -import java.util.List; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - -import org.openejb.xml.ns.openejb.jar.*; - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) 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 org.openejb.xml.ns.openejb.jar.JarPackage - * @generated - */ -public class JarSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static JarPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public JarSwitch() { - if (modelPackage == null) { - modelPackage = JarPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected Object doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } - else { - List eSuperTypes = theEClass.getESuperTypes(); - return - eSuperTypes.isEmpty() ? - defaultCase(theEObject) : - doSwitch((EClass)eSuperTypes.get(0), theEObject); - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected Object doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case JarPackage.ACTIVATION_CONFIG_PROPERTY_TYPE: { - ActivationConfigPropertyType activationConfigPropertyType = (ActivationConfigPropertyType)theEObject; - Object result = caseActivationConfigPropertyType(activationConfigPropertyType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.ACTIVATION_CONFIG_TYPE: { - ActivationConfigType activationConfigType = (ActivationConfigType)theEObject; - Object result = caseActivationConfigType(activationConfigType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.CMP_FIELD_GROUP_MAPPING_TYPE: { - CmpFieldGroupMappingType cmpFieldGroupMappingType = (CmpFieldGroupMappingType)theEObject; - Object result = caseCmpFieldGroupMappingType(cmpFieldGroupMappingType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.CMP_FIELD_MAPPING_TYPE: { - CmpFieldMappingType cmpFieldMappingType = (CmpFieldMappingType)theEObject; - Object result = caseCmpFieldMappingType(cmpFieldMappingType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.CMR_FIELD_GROUP_MAPPING_TYPE: { - CmrFieldGroupMappingType cmrFieldGroupMappingType = (CmrFieldGroupMappingType)theEObject; - Object result = caseCmrFieldGroupMappingType(cmrFieldGroupMappingType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.CMR_FIELD_MAPPING_TYPE: { - CmrFieldMappingType cmrFieldMappingType = (CmrFieldMappingType)theEObject; - Object result = caseCmrFieldMappingType(cmrFieldMappingType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.CMR_FIELD_TYPE: { - CmrFieldType cmrFieldType = (CmrFieldType)theEObject; - Object result = caseCmrFieldType(cmrFieldType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.CMR_FIELD_TYPE1: { - CmrFieldType1 cmrFieldType1 = (CmrFieldType1)theEObject; - Object result = caseCmrFieldType1(cmrFieldType1); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.DOCUMENT_ROOT: { - DocumentRoot documentRoot = (DocumentRoot)theEObject; - Object result = caseDocumentRoot(documentRoot); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.EJB_RELATIONSHIP_ROLE_TYPE: { - EjbRelationshipRoleType ejbRelationshipRoleType = (EjbRelationshipRoleType)theEObject; - Object result = caseEjbRelationshipRoleType(ejbRelationshipRoleType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.EJB_RELATION_TYPE: { - EjbRelationType ejbRelationType = (EjbRelationType)theEObject; - Object result = caseEjbRelationType(ejbRelationType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.ENTERPRISE_BEANS_TYPE: { - EnterpriseBeansType enterpriseBeansType = (EnterpriseBeansType)theEObject; - Object result = caseEnterpriseBeansType(enterpriseBeansType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.ENTITY_BEAN_TYPE: { - EntityBeanType entityBeanType = (EntityBeanType)theEObject; - Object result = caseEntityBeanType(entityBeanType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.ENTITY_GROUP_MAPPING_TYPE: { - EntityGroupMappingType entityGroupMappingType = (EntityGroupMappingType)theEObject; - Object result = caseEntityGroupMappingType(entityGroupMappingType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.GROUP_TYPE: { - GroupType groupType = (GroupType)theEObject; - Object result = caseGroupType(groupType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.MESSAGE_DRIVEN_BEAN_TYPE: { - MessageDrivenBeanType messageDrivenBeanType = (MessageDrivenBeanType)theEObject; - Object result = caseMessageDrivenBeanType(messageDrivenBeanType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.METHOD_PARAMS_TYPE: { - MethodParamsType methodParamsType = (MethodParamsType)theEObject; - Object result = caseMethodParamsType(methodParamsType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.OPENEJB_JAR_TYPE: { - OpenejbJarType openejbJarType = (OpenejbJarType)theEObject; - Object result = caseOpenejbJarType(openejbJarType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.PREFETCH_GROUP_TYPE: { - PrefetchGroupType prefetchGroupType = (PrefetchGroupType)theEObject; - Object result = casePrefetchGroupType(prefetchGroupType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.QUERY_METHOD_TYPE: { - QueryMethodType queryMethodType = (QueryMethodType)theEObject; - Object result = caseQueryMethodType(queryMethodType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.QUERY_TYPE: { - QueryType queryType = (QueryType)theEObject; - Object result = caseQueryType(queryType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.RELATIONSHIP_ROLE_SOURCE_TYPE: { - RelationshipRoleSourceType relationshipRoleSourceType = (RelationshipRoleSourceType)theEObject; - Object result = caseRelationshipRoleSourceType(relationshipRoleSourceType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.RELATIONSHIPS_TYPE: { - RelationshipsType relationshipsType = (RelationshipsType)theEObject; - Object result = caseRelationshipsType(relationshipsType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.ROLE_MAPPING_TYPE: { - RoleMappingType roleMappingType = (RoleMappingType)theEObject; - Object result = caseRoleMappingType(roleMappingType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.SESSION_BEAN_TYPE: { - SessionBeanType sessionBeanType = (SessionBeanType)theEObject; - Object result = caseSessionBeanType(sessionBeanType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.TSS_TYPE: { - TssType tssType = (TssType)theEObject; - Object result = caseTssType(tssType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case JarPackage.WEB_SERVICE_SECURITY_TYPE: { - WebServiceSecurityType webServiceSecurityType = (WebServiceSecurityType)theEObject; - Object result = caseWebServiceSecurityType(webServiceSecurityType); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpretting the object as an instance of 'Activation Config Property Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Activation Config Property Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseActivationConfigPropertyType(ActivationConfigPropertyType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Activation Config Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Activation Config Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseActivationConfigType(ActivationConfigType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Cmp Field Group Mapping Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Cmp Field Group Mapping Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCmpFieldGroupMappingType(CmpFieldGroupMappingType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Cmp Field Mapping Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Cmp Field Mapping Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCmpFieldMappingType(CmpFieldMappingType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Cmr Field Group Mapping Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Cmr Field Group Mapping Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCmrFieldGroupMappingType(CmrFieldGroupMappingType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Cmr Field Mapping Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Cmr Field Mapping Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCmrFieldMappingType(CmrFieldMappingType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Cmr Field Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Cmr Field Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCmrFieldType(CmrFieldType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Cmr Field Type1'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Cmr Field Type1'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseCmrFieldType1(CmrFieldType1 object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Document Root'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Document Root'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseDocumentRoot(DocumentRoot object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Ejb Relationship Role Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Ejb Relationship Role Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEjbRelationshipRoleType(EjbRelationshipRoleType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Ejb Relation Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Ejb Relation Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEjbRelationType(EjbRelationType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Enterprise Beans Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Enterprise Beans Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEnterpriseBeansType(EnterpriseBeansType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Entity Bean Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Entity Bean Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEntityBeanType(EntityBeanType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Entity Group Mapping Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Entity Group Mapping Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseEntityGroupMappingType(EntityGroupMappingType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Group Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Group Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseGroupType(GroupType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Message Driven Bean Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Message Driven Bean Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMessageDrivenBeanType(MessageDrivenBeanType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Method Params Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Method Params Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseMethodParamsType(MethodParamsType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Openejb Jar Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Openejb Jar Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseOpenejbJarType(OpenejbJarType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Prefetch Group Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Prefetch Group Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object casePrefetchGroupType(PrefetchGroupType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Query Method Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Query Method Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseQueryMethodType(QueryMethodType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Query Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Query Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseQueryType(QueryType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Relationship Role Source Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Relationship Role Source Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseRelationshipRoleSourceType(RelationshipRoleSourceType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Relationships Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Relationships Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseRelationshipsType(RelationshipsType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Role Mapping Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Role Mapping Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseRoleMappingType(RoleMappingType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Session Bean Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Session Bean Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseSessionBeanType(SessionBeanType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Tss Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Tss Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseTssType(TssType object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of 'Web Service Security Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'Web Service Security Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseWebServiceSecurityType(WebServiceSecurityType object) { - return null; - } - - /** - * Returns the result of interpretting 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. - * - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //JarSwitch +/** + * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.openejb.xml.ns.openejb.jar.util; + +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.openejb.xml.ns.openejb.jar.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) 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 org.openejb.xml.ns.openejb.jar.JarPackage + * @generated + */ +public class JarSwitch { + /** + * The cached model package + * + * + * @generated + */ + protected static JarPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public JarSwitch() { + if (modelPackage == null) { + modelPackage = JarPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public Object doSwitch(EObject theEObject) { + return doSwitch(theEObject.eClass(), theEObject); + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + protected Object doSwitch(EClass theEClass, EObject theEObject) { + if (theEClass.eContainer() == modelPackage) { + return doSwitch(theEClass.getClassifierID(), theEObject); + } + else { + List eSuperTypes = theEClass.getESuperTypes(); + return + eSuperTypes.isEmpty() ? + defaultCase(theEObject) : + doSwitch((EClass)eSuperTypes.get(0), theEObject); + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + protected Object doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case JarPackage.ACTIVATION_CONFIG_PROPERTY_TYPE: { + ActivationConfigPropertyType activationConfigPropertyType = (ActivationConfigPropertyType)theEObject; + Object result = caseActivationConfigPropertyType(activationConfigPropertyType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.ACTIVATION_CONFIG_TYPE: { + ActivationConfigType activationConfigType = (ActivationConfigType)theEObject; + Object result = caseActivationConfigType(activationConfigType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.CMP_FIELD_GROUP_MAPPING_TYPE: { + CmpFieldGroupMappingType cmpFieldGroupMappingType = (CmpFieldGroupMappingType)theEObject; + Object result = caseCmpFieldGroupMappingType(cmpFieldGroupMappingType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.CMP_FIELD_MAPPING_TYPE: { + CmpFieldMappingType cmpFieldMappingType = (CmpFieldMappingType)theEObject; + Object result = caseCmpFieldMappingType(cmpFieldMappingType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.CMR_FIELD_GROUP_MAPPING_TYPE: { + CmrFieldGroupMappingType cmrFieldGroupMappingType = (CmrFieldGroupMappingType)theEObject; + Object result = caseCmrFieldGroupMappingType(cmrFieldGroupMappingType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.CMR_FIELD_MAPPING_TYPE: { + CmrFieldMappingType cmrFieldMappingType = (CmrFieldMappingType)theEObject; + Object result = caseCmrFieldMappingType(cmrFieldMappingType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.CMR_FIELD_TYPE: { + CmrFieldType cmrFieldType = (CmrFieldType)theEObject; + Object result = caseCmrFieldType(cmrFieldType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.CMR_FIELD_TYPE1: { + CmrFieldType1 cmrFieldType1 = (CmrFieldType1)theEObject; + Object result = caseCmrFieldType1(cmrFieldType1); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.DOCUMENT_ROOT: { + DocumentRoot documentRoot = (DocumentRoot)theEObject; + Object result = caseDocumentRoot(documentRoot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.EJB_RELATIONSHIP_ROLE_TYPE: { + EjbRelationshipRoleType ejbRelationshipRoleType = (EjbRelationshipRoleType)theEObject; + Object result = caseEjbRelationshipRoleType(ejbRelationshipRoleType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.EJB_RELATION_TYPE: { + EjbRelationType ejbRelationType = (EjbRelationType)theEObject; + Object result = caseEjbRelationType(ejbRelationType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.ENTERPRISE_BEANS_TYPE: { + EnterpriseBeansType enterpriseBeansType = (EnterpriseBeansType)theEObject; + Object result = caseEnterpriseBeansType(enterpriseBeansType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.ENTITY_BEAN_TYPE: { + EntityBeanType entityBeanType = (EntityBeanType)theEObject; + Object result = caseEntityBeanType(entityBeanType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.ENTITY_GROUP_MAPPING_TYPE: { + EntityGroupMappingType entityGroupMappingType = (EntityGroupMappingType)theEObject; + Object result = caseEntityGroupMappingType(entityGroupMappingType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.GROUP_TYPE: { + GroupType groupType = (GroupType)theEObject; + Object result = caseGroupType(groupType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.MESSAGE_DRIVEN_BEAN_TYPE: { + MessageDrivenBeanType messageDrivenBeanType = (MessageDrivenBeanType)theEObject; + Object result = caseMessageDrivenBeanType(messageDrivenBeanType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.METHOD_PARAMS_TYPE: { + MethodParamsType methodParamsType = (MethodParamsType)theEObject; + Object result = caseMethodParamsType(methodParamsType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.OPENEJB_JAR_TYPE: { + OpenejbJarType openejbJarType = (OpenejbJarType)theEObject; + Object result = caseOpenejbJarType(openejbJarType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.PREFETCH_GROUP_TYPE: { + PrefetchGroupType prefetchGroupType = (PrefetchGroupType)theEObject; + Object result = casePrefetchGroupType(prefetchGroupType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.QUERY_METHOD_TYPE: { + QueryMethodType queryMethodType = (QueryMethodType)theEObject; + Object result = caseQueryMethodType(queryMethodType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.QUERY_TYPE: { + QueryType queryType = (QueryType)theEObject; + Object result = caseQueryType(queryType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.RELATIONSHIP_ROLE_SOURCE_TYPE: { + RelationshipRoleSourceType relationshipRoleSourceType = (RelationshipRoleSourceType)theEObject; + Object result = caseRelationshipRoleSourceType(relationshipRoleSourceType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.RELATIONSHIPS_TYPE: { + RelationshipsType relationshipsType = (RelationshipsType)theEObject; + Object result = caseRelationshipsType(relationshipsType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.ROLE_MAPPING_TYPE: { + RoleMappingType roleMappingType = (RoleMappingType)theEObject; + Object result = caseRoleMappingType(roleMappingType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.SESSION_BEAN_TYPE: { + SessionBeanType sessionBeanType = (SessionBeanType)theEObject; + Object result = caseSessionBeanType(sessionBeanType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.TSS_TYPE: { + TssType tssType = (TssType)theEObject; + Object result = caseTssType(tssType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case JarPackage.WEB_SERVICE_SECURITY_TYPE: { + WebServiceSecurityType webServiceSecurityType = (WebServiceSecurityType)theEObject; + Object result = caseWebServiceSecurityType(webServiceSecurityType); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpretting the object as an instance of 'Activation Config Property Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Activation Config Property Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseActivationConfigPropertyType(ActivationConfigPropertyType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Activation Config Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Activation Config Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseActivationConfigType(ActivationConfigType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Cmp Field Group Mapping Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Cmp Field Group Mapping Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCmpFieldGroupMappingType(CmpFieldGroupMappingType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Cmp Field Mapping Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Cmp Field Mapping Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCmpFieldMappingType(CmpFieldMappingType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Cmr Field Group Mapping Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Cmr Field Group Mapping Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCmrFieldGroupMappingType(CmrFieldGroupMappingType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Cmr Field Mapping Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Cmr Field Mapping Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCmrFieldMappingType(CmrFieldMappingType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Cmr Field Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Cmr Field Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCmrFieldType(CmrFieldType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Cmr Field Type1'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Cmr Field Type1'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseCmrFieldType1(CmrFieldType1 object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Document Root'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Document Root'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseDocumentRoot(DocumentRoot object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Ejb Relationship Role Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Ejb Relationship Role Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEjbRelationshipRoleType(EjbRelationshipRoleType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Ejb Relation Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Ejb Relation Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEjbRelationType(EjbRelationType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Enterprise Beans Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Enterprise Beans Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEnterpriseBeansType(EnterpriseBeansType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Entity Bean Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Entity Bean Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEntityBeanType(EntityBeanType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Entity Group Mapping Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Entity Group Mapping Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseEntityGroupMappingType(EntityGroupMappingType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Group Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Group Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseGroupType(GroupType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Message Driven Bean Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Message Driven Bean Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMessageDrivenBeanType(MessageDrivenBeanType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Method Params Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Method Params Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseMethodParamsType(MethodParamsType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Openejb Jar Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Openejb Jar Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseOpenejbJarType(OpenejbJarType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Prefetch Group Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Prefetch Group Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object casePrefetchGroupType(PrefetchGroupType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Query Method Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Query Method Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseQueryMethodType(QueryMethodType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Query Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Query Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseQueryType(QueryType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Relationship Role Source Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Relationship Role Source Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseRelationshipRoleSourceType(RelationshipRoleSourceType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Relationships Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Relationships Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseRelationshipsType(RelationshipsType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Role Mapping Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Role Mapping Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseRoleMappingType(RoleMappingType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Session Bean Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Session Bean Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseSessionBeanType(SessionBeanType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Tss Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Tss Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseTssType(TssType object) { + return null; + } + + /** + * Returns the result of interpretting the object as an instance of 'Web Service Security Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'Web Service Security Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseWebServiceSecurityType(WebServiceSecurityType object) { + return null; + } + + /** + * Returns the result of interpretting 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. + * + * @param object the target of the switch. + * @return the result of interpretting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public Object defaultCase(EObject object) { + return null; + } + +} //JarSwitch Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/openejb/xml/ns/openejb/jar/util/JarSwitch.java ------------------------------------------------------------------------------ svn:eol-style = native