| /******************************************************************************* |
| * Copyright (c) 2009, 2019 Xored Software Inc and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * Xored Software Inc - initial API and implementation and/or initial documentation |
| *******************************************************************************/ |
| package org.eclipse.rcptt.verifications.log.impl; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| import org.eclipse.rcptt.verifications.log.*; |
| import org.eclipse.rcptt.verifications.log.ErrorLogVerification; |
| import org.eclipse.rcptt.verifications.log.LogEntryPredicate; |
| import org.eclipse.rcptt.verifications.log.LogFactory; |
| import org.eclipse.rcptt.verifications.log.LogPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class LogFactoryImpl extends EFactoryImpl implements LogFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static LogFactory init() { |
| try { |
| LogFactory theLogFactory = (LogFactory)EPackage.Registry.INSTANCE.getEFactory(LogPackage.eNS_URI); |
| if (theLogFactory != null) { |
| return theLogFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new LogFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public LogFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case LogPackage.LOG_ENTRY_PREDICATE: return createLogEntryPredicate(); |
| case LogPackage.ERROR_LOG_VERIFICATION: return createErrorLogVerification(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public LogEntryPredicate createLogEntryPredicate() { |
| LogEntryPredicateImpl logEntryPredicate = new LogEntryPredicateImpl(); |
| return logEntryPredicate; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public ErrorLogVerification createErrorLogVerification() { |
| ErrorLogVerificationImpl errorLogVerification = new ErrorLogVerificationImpl(); |
| return errorLogVerification; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public LogPackage getLogPackage() { |
| return (LogPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static LogPackage getPackage() { |
| return LogPackage.eINSTANCE; |
| } |
| |
| } //LogFactoryImpl |