| /******************************************************************************* |
| * Copyright (c) 2010, 2022 Willink Transformations 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 |
| * http://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * E.D.Willink - Initial API and implementation |
| ************************************************************************* |
| * This code is 100% auto-generated |
| * from: |
| * /org.eclipse.qvtd.runtime/model-gen/QVTruntimeLibrary.ecore |
| * using: |
| * /org.eclipse.qvtd.runtime/model/QVTruntimeLibrary.genmodel |
| * org.eclipse.ocl.examples.codegen.oclinecore.OCLinEcoreTables |
| * |
| * Do not edit it. |
| *******************************************************************************/ |
| package org.eclipse.qvtd.runtime.qvtruntimelibrary; |
| |
| import org.eclipse.jdt.annotation.NonNull; |
| import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorPackage; |
| import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorProperty; |
| import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorType; |
| import org.eclipse.ocl.pivot.internal.library.executor.ExecutorFragment; |
| import org.eclipse.ocl.pivot.internal.library.executor.ExecutorOperation; |
| import org.eclipse.ocl.pivot.internal.library.executor.ExecutorProperty; |
| import org.eclipse.ocl.pivot.internal.library.executor.ExecutorStandardLibrary; |
| import org.eclipse.ocl.pivot.oclstdlib.OCLstdlibTables; |
| import org.eclipse.ocl.pivot.utilities.AbstractTables; |
| // import org.eclipse.qvtd.runtime.qvtruntimelibrary.QVTruntimeLibraryTables; |
| |
| /** |
| * QVTruntimeLibraryTables provides the dispatch tables for the qvtruntimelibrary for use by the OCL dispatcher. |
| * |
| * In order to ensure correct static initialization, a top level class element must be accessed |
| * before any nested class element. Therefore an access to PACKAGE.getClass() is recommended. |
| */ |
| public class QVTruntimeLibraryTables extends AbstractTables |
| { |
| static { |
| Init.initStart(); |
| } |
| |
| /** |
| * The package descriptor for the package. |
| */ |
| public static final @NonNull EcoreExecutorPackage PACKAGE = new EcoreExecutorPackage(QVTruntimeLibraryPackage.eINSTANCE); |
| |
| /** |
| * The library of all packages and types. |
| */ |
| public static final @NonNull ExecutorStandardLibrary LIBRARY = OCLstdlibTables.LIBRARY; |
| |
| /** |
| * The type parameters for templated types and operations. |
| */ |
| public static class TypeParameters { |
| static { |
| Init.initStart(); |
| QVTruntimeLibraryTables.init(); |
| } |
| |
| static { |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::TypeParameters and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The type descriptors for each type. |
| */ |
| public static class Types { |
| static { |
| Init.initStart(); |
| TypeParameters.init(); |
| } |
| |
| public static final @NonNull EcoreExecutorType _Extent = new EcoreExecutorType(QVTruntimeLibraryPackage.Literals.EXTENT, PACKAGE, 0); |
| public static final @NonNull EcoreExecutorType _Model = new EcoreExecutorType(QVTruntimeLibraryPackage.Literals.MODEL, PACKAGE, 0); |
| public static final @NonNull EcoreExecutorType _Transformation = new EcoreExecutorType(QVTruntimeLibraryPackage.Literals.TRANSFORMATION, PACKAGE, 0); |
| |
| private static final @NonNull EcoreExecutorType @NonNull [] types = { |
| _Extent, |
| _Model, |
| _Transformation |
| }; |
| |
| /* |
| * Install the type descriptors in the package descriptor. |
| */ |
| static { |
| PACKAGE.init(LIBRARY, types); |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::Types and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The fragment descriptors for the local elements of each type and its supertypes. |
| */ |
| public static class Fragments { |
| static { |
| Init.initStart(); |
| Types.init(); |
| } |
| |
| private static final @NonNull ExecutorFragment _Extent__Extent = new ExecutorFragment(Types._Extent, QVTruntimeLibraryTables.Types._Extent); |
| private static final @NonNull ExecutorFragment _Extent__OclAny = new ExecutorFragment(Types._Extent, OCLstdlibTables.Types._OclAny); |
| private static final @NonNull ExecutorFragment _Extent__OclElement = new ExecutorFragment(Types._Extent, OCLstdlibTables.Types._OclElement); |
| |
| private static final @NonNull ExecutorFragment _Model__Model = new ExecutorFragment(Types._Model, QVTruntimeLibraryTables.Types._Model); |
| private static final @NonNull ExecutorFragment _Model__OclAny = new ExecutorFragment(Types._Model, OCLstdlibTables.Types._OclAny); |
| private static final @NonNull ExecutorFragment _Model__OclElement = new ExecutorFragment(Types._Model, OCLstdlibTables.Types._OclElement); |
| |
| private static final @NonNull ExecutorFragment _Transformation__OclAny = new ExecutorFragment(Types._Transformation, OCLstdlibTables.Types._OclAny); |
| private static final @NonNull ExecutorFragment _Transformation__OclElement = new ExecutorFragment(Types._Transformation, OCLstdlibTables.Types._OclElement); |
| private static final @NonNull ExecutorFragment _Transformation__Transformation = new ExecutorFragment(Types._Transformation, QVTruntimeLibraryTables.Types._Transformation); |
| |
| static { |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::Fragments and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The parameter lists shared by operations. |
| * |
| * @noextend This class is not intended to be subclassed by clients. |
| * @noinstantiate This class is not intended to be instantiated by clients. |
| * @noreference This class is not intended to be referenced by clients. |
| */ |
| public static class Parameters { |
| static { |
| Init.initStart(); |
| Fragments.init(); |
| } |
| |
| |
| static { |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::Parameters and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The operation descriptors for each operation of each type. |
| * |
| * @noextend This class is not intended to be subclassed by clients. |
| * @noinstantiate This class is not intended to be instantiated by clients. |
| * @noreference This class is not intended to be referenced by clients. |
| */ |
| public static class Operations { |
| static { |
| Init.initStart(); |
| Parameters.init(); |
| } |
| |
| static { |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::Operations and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The property descriptors for each property of each type. |
| * |
| * @noextend This class is not intended to be subclassed by clients. |
| * @noinstantiate This class is not intended to be instantiated by clients. |
| * @noreference This class is not intended to be referenced by clients. |
| */ |
| public static class Properties { |
| static { |
| Init.initStart(); |
| Operations.init(); |
| } |
| |
| public static final @NonNull ExecutorProperty _Extent__elements = new EcoreExecutorProperty(QVTruntimeLibraryPackage.Literals.EXTENT__ELEMENTS, Types._Extent, 0); |
| static { |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::Properties and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The fragments for all base types in depth order: OclAny first, OclSelf last. |
| */ |
| public static class TypeFragments { |
| static { |
| Init.initStart(); |
| Properties.init(); |
| } |
| |
| private static final @NonNull ExecutorFragment @NonNull [] _Extent = |
| { |
| Fragments._Extent__OclAny /* 0 */, |
| Fragments._Extent__OclElement /* 1 */, |
| Fragments._Extent__Extent /* 2 */ |
| }; |
| private static final int @NonNull [] __Extent = { 1,1,1 }; |
| |
| private static final @NonNull ExecutorFragment @NonNull [] _Model = |
| { |
| Fragments._Model__OclAny /* 0 */, |
| Fragments._Model__OclElement /* 1 */, |
| Fragments._Model__Model /* 2 */ |
| }; |
| private static final int @NonNull [] __Model = { 1,1,1 }; |
| |
| private static final @NonNull ExecutorFragment @NonNull [] _Transformation = |
| { |
| Fragments._Transformation__OclAny /* 0 */, |
| Fragments._Transformation__OclElement /* 1 */, |
| Fragments._Transformation__Transformation /* 2 */ |
| }; |
| private static final int @NonNull [] __Transformation = { 1,1,1 }; |
| |
| /** |
| * Install the fragment descriptors in the class descriptors. |
| */ |
| static { |
| Types._Extent.initFragments(_Extent, __Extent); |
| Types._Model.initFragments(_Model, __Model); |
| Types._Transformation.initFragments(_Transformation, __Transformation); |
| |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::TypeFragments and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The lists of local operations or local operation overrides for each fragment of each type. |
| */ |
| public static class FragmentOperations { |
| static { |
| Init.initStart(); |
| TypeFragments.init(); |
| } |
| |
| private static final @NonNull ExecutorOperation @NonNull [] _Extent__Extent = {}; |
| private static final @NonNull ExecutorOperation @NonNull [] _Extent__OclAny = { |
| OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */, |
| OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */, |
| OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */, |
| OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */, |
| OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */, |
| OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */, |
| OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */, |
| OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclType /* oclType() */, |
| OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */, |
| OCLstdlibTables.Operations._OclAny__toString /* toString() */ |
| }; |
| private static final @NonNull ExecutorOperation @NonNull [] _Extent__OclElement = { |
| OCLstdlibTables.Operations._OclElement__allInstances /* allInstances(Integer[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */, |
| OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */, |
| OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */, |
| OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */ |
| }; |
| |
| private static final @NonNull ExecutorOperation @NonNull [] _Model__Model = {}; |
| private static final @NonNull ExecutorOperation @NonNull [] _Model__OclAny = { |
| OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */, |
| OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */, |
| OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */, |
| OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */, |
| OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */, |
| OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */, |
| OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */, |
| OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclType /* oclType() */, |
| OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */, |
| OCLstdlibTables.Operations._OclAny__toString /* toString() */ |
| }; |
| private static final @NonNull ExecutorOperation @NonNull [] _Model__OclElement = { |
| OCLstdlibTables.Operations._OclElement__allInstances /* allInstances(Integer[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */, |
| OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */, |
| OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */, |
| OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */ |
| }; |
| |
| private static final @NonNull ExecutorOperation @NonNull [] _Transformation__Transformation = {}; |
| private static final @NonNull ExecutorOperation @NonNull [] _Transformation__OclAny = { |
| OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */, |
| OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */, |
| OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */, |
| OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */, |
| OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */, |
| OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */, |
| OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */, |
| OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[1]) */, |
| OCLstdlibTables.Operations._OclAny__oclType /* oclType() */, |
| OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */, |
| OCLstdlibTables.Operations._OclAny__toString /* toString() */ |
| }; |
| private static final @NonNull ExecutorOperation @NonNull [] _Transformation__OclElement = { |
| OCLstdlibTables.Operations._OclElement__allInstances /* allInstances(Integer[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */, |
| OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */, |
| OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[1]) */, |
| OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */, |
| OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */ |
| }; |
| |
| /* |
| * Install the operation descriptors in the fragment descriptors. |
| */ |
| static { |
| Fragments._Extent__Extent.initOperations(_Extent__Extent); |
| Fragments._Extent__OclAny.initOperations(_Extent__OclAny); |
| Fragments._Extent__OclElement.initOperations(_Extent__OclElement); |
| |
| Fragments._Model__Model.initOperations(_Model__Model); |
| Fragments._Model__OclAny.initOperations(_Model__OclAny); |
| Fragments._Model__OclElement.initOperations(_Model__OclElement); |
| |
| Fragments._Transformation__OclAny.initOperations(_Transformation__OclAny); |
| Fragments._Transformation__OclElement.initOperations(_Transformation__OclElement); |
| Fragments._Transformation__Transformation.initOperations(_Transformation__Transformation); |
| |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::FragmentOperations and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The lists of local properties for the local fragment of each type. |
| */ |
| public static class FragmentProperties { |
| static { |
| Init.initStart(); |
| FragmentOperations.init(); |
| } |
| |
| private static final @NonNull ExecutorProperty @NonNull [] _Extent = { |
| QVTruntimeLibraryTables.Properties._Extent__elements, |
| OCLstdlibTables.Properties._OclElement__oclContainer, |
| OCLstdlibTables.Properties._OclElement__oclContents |
| }; |
| |
| private static final @NonNull ExecutorProperty @NonNull [] _Model = { |
| OCLstdlibTables.Properties._OclElement__oclContainer, |
| OCLstdlibTables.Properties._OclElement__oclContents |
| }; |
| |
| private static final @NonNull ExecutorProperty @NonNull [] _Transformation = { |
| OCLstdlibTables.Properties._OclElement__oclContainer, |
| OCLstdlibTables.Properties._OclElement__oclContents |
| }; |
| |
| /** |
| * Install the property descriptors in the fragment descriptors. |
| */ |
| static { |
| Fragments._Extent__Extent.initProperties(_Extent); |
| Fragments._Model__Model.initProperties(_Model); |
| Fragments._Transformation__Transformation.initProperties(_Transformation); |
| |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::FragmentProperties and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The lists of enumeration literals for each enumeration. |
| */ |
| public static class EnumerationLiterals { |
| static { |
| Init.initStart(); |
| FragmentProperties.init(); |
| } |
| |
| /** |
| * Install the enumeration literals in the enumerations. |
| */ |
| static { |
| |
| Init.initEnd(); |
| } |
| |
| /** |
| * Force initialization of the fields of QVTruntimeLibraryTables::EnumerationLiterals and all preceding sub-packages. |
| */ |
| public static void init() {} |
| } |
| |
| /** |
| * The multiple packages above avoid problems with the Java 65536 byte limit but introduce a difficulty in ensuring that |
| * static construction occurs in the disciplined order of the packages when construction may start in any of the packages. |
| * The problem is resolved by ensuring that the static construction of each package first initializes its immediate predecessor. |
| * On completion of predecessor initialization, the residual packages are initialized by starting an initialization in the last package. |
| * This class maintains a count so that the various predecessors can distinguish whether they are the starting point and so |
| * ensure that residual construction occurs just once after all predecessors. |
| */ |
| private static class Init { |
| /** |
| * Counter of nested static constructions. On return to zero residual construction starts. -ve once residual construction started. |
| */ |
| private static int initCount = 0; |
| |
| /** |
| * Invoked at the start of a static construction to defer residual construction until primary constructions complete. |
| */ |
| private static void initStart() { |
| if (initCount >= 0) { |
| initCount++; |
| } |
| } |
| |
| /** |
| * Invoked at the end of a static construction to activate residual construction once primary constructions complete. |
| */ |
| private static void initEnd() { |
| if (initCount > 0) { |
| if (--initCount == 0) { |
| initCount = -1; |
| EnumerationLiterals.init(); |
| } |
| } |
| } |
| } |
| |
| static { |
| Init.initEnd(); |
| } |
| |
| /* |
| * Force initialization of outer fields. Inner fields are lazily initialized. |
| */ |
| public static void init() { |
| new QVTruntimeLibraryTables(); |
| } |
| |
| private QVTruntimeLibraryTables() { |
| super(QVTruntimeLibraryPackage.eNS_URI); |
| } |
| } |