Closed eclipse-ocl-bot closed 2 weeks ago
By Nicolas Rouquette on Aug 19, 2013 16:12
Created attachment 234550 genmodel
By Ed Willink on Sep 04, 2013 09:00
Bug 414244 has been marked as a duplicate of this bug.
By Ed Willink on Sep 04, 2013 14:18
Thanks. A real bonus to geta good solution to a tricky problem as well.
Pushed to master for M2.
By Ed Willink on Jan 31, 2014 06:10
Bug 427103 has been marked as a duplicate of this bug.
By Ed Willink on May 25, 2015 17:20
CLOSED after more than a year in the RESOLVED state.
| --- | --- | | Bugzilla Link | 415381 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Aug 19, 2013 16:12 EDT | | Modified | May 25, 2015 17:20 EDT | | Version | 4.0.0 | | Reporter | Nicolas Rouquette |
Description
Created attachment 234549\ ecore metamodel
I generated the java code for an ecore metamodel of OMG SysML/ValueTypes/QUDV with OCL constraints using Ed W.'s new XText-based OCL tooling:
https://hudson.eclipse.org/hudson/job/buckminster-ocl-branch-tests/381/artifact/MDT-OCL.downloads/mdt-ocl-Update-tools-201308160535.zip
The difference between the edw/414040 branch vs. HEAD is that in the edw/414040, there is a fix for generating scoped package names in case there are multiple EClasses of the same name in different EPackages of the genmodel's ecore metamodel. This is the case for the ecore/genmodel I produced for OMG's SysML 1.4 SysML/ValueTypes/QUDV (see attached).
The generated code includes a file:
/sysml_valuetype_qudv.metamodel/src-gen/SysML_ValueTypes_QUDV/UnitAndQuantityKind/UnitAndQuantityKindTables.java
(see attached).
The problem happens during the java static initialization when this class is loaded:
{code}
Caused by: java.lang.ExceptionInInitializerError\ at SysML_ValueTypes_QUDV.UnitAndQuantityKind.UnitAndQuantityKindTables$Types.(UnitAndQuantityKindTables.java:70)\
at SysML_ValueTypes_QUDV.QUDV.QUDVTables$Fragments.(QUDVTables.java:180)\
at SysML_ValueTypes_QUDV.QUDV.QUDVTables$TypeFragments.(QUDVTables.java:433)\
at SysML_ValueTypes_QUDV.QUDV.QUDVTables$Types.(QUDVTables.java:165)\
at SysML_ValueTypes_QUDV.QUDV.QUDVTables.(QUDVTables.java:1465)\
at SysML_ValueTypes_QUDV.QUDV.impl.DerivedQuantityKindImpl.dependsOnQuantityKinds(DerivedQuantityKindImpl.java:115)\
at SysML_ValueTypes_QUDV.QUDV.impl.QuantityKindImpl.getDependsOnQuantityKinds(QuantityKindImpl.java:147)\
at SysML_ValueTypes_QUDV.QUDV.impl.QuantityKindImpl.eIsSet(QuantityKindImpl.java:330)\
at SysML_ValueTypes_QUDV.QUDV.impl.DerivedQuantityKindImpl.eIsSet(DerivedQuantityKindImpl.java:231)\
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectImpl.java:1237)\
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:401)\
at org.eclipse.emf.ecore.util.EcoreUtil.resolveCrossReferences(EcoreUtil.java:303)\
at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.java:297)\
at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.java:282)\
at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.java:270)\
at org.eclipse.emf.editor.EEditor.findMetaModelPackages(EEditor.java:321)\
at org.eclipse.emf.editor.EEditor.createExtXptFacade(EEditor.java:304)\
at org.eclipse.emf.editor.EEditor.initInternal(EEditor.java:250)\
at org.eclipse.emf.editor.EEditor.createPages(EEditor.java:228)\
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:358)\
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:142)\
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)\
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:323)\
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\
at java.lang.reflect.Method.invoke(Method.java:597)\
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 80 more\
Caused by: java.lang.NullPointerException\
at SysML_ValueTypes_QUDV.UnitAndQuantityKind.UnitAndQuantityKindTables.(UnitAndQuantityKindTables.java:274)
... 108 more\
{code}
The NPE happened with the generated code at the end of the file (line 274):
{code}\ /**\
import SysML_ValueTypes_QUDV.SysML_ValueTypes_QUDVPackage;\ import SysML_ValueTypes_QUDV.UnitAndQuantityKind.UnitAndQuantityKindPackage;\ import SysML_ValueTypes_QUDV.UnitAndQuantityKind.UnitAndQuantityKindTables;\ import org.eclipse.jdt.annotation.NonNull;\ import org.eclipse.ocl.examples.domain.ids.ClassId;\ import org.eclipse.ocl.examples.domain.ids.CollectionTypeId;\ import org.eclipse.ocl.examples.domain.ids.IdManager;\ import org.eclipse.ocl.examples.domain.ids.NsURIPackageId;\ import org.eclipse.ocl.examples.domain.ids.TypeId;\ import org.eclipse.ocl.examples.library.ecore.EcoreExecutorPackage;\ import org.eclipse.ocl.examples.library.ecore.EcoreExecutorProperty;\ import org.eclipse.ocl.examples.library.ecore.EcoreExecutorType;\ import org.eclipse.ocl.examples.library.ecore.EcoreLibraryOppositeProperty;\ import org.eclipse.ocl.examples.library.executor.ExecutorFragment;\ import org.eclipse.ocl.examples.library.executor.ExecutorOperation;\ import org.eclipse.ocl.examples.library.executor.ExecutorProperty;\ import org.eclipse.ocl.examples.library.executor.ExecutorPropertyWithImplementation;\ import org.eclipse.ocl.examples.library.executor.ExecutorStandardLibrary;\ import org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables;
/**
before any nested class element. Therefore an access to PACKAGE.getClass() is recommended.\ */\ @SuppressWarnings("nls")\ public class UnitAndQuantityKindTables\ {\ /**\
/**\
/**\
/**\
/**\
The type descriptors for each type.\ */\ public static class Types {\ public static final @NonNull EcoreExecutorType _QuantityKind = new EcoreExecutorType(UnitAndQuantityKindPackage.Literals.QUANTITY_KIND, PACKAGE, 0);\ public static final @NonNull EcoreExecutorType _Unit = new EcoreExecutorType(UnitAndQuantityKindPackage.Literals.UNIT, PACKAGE, 0);
private static final @NonNull EcoreExecutorType[] types = {\ _QuantityKind,\ _Unit\ };
/*\
/**\
The fragment descriptors for the local elements of each type and its supertypes.\ */\ public static class Fragments {\ private static final @NonNull ExecutorFragment _QuantityKindOclAny = new ExecutorFragment(Types._QuantityKind, OCLstdlibTables.Types._OclAny);\ private static final @NonNull ExecutorFragment _QuantityKind__OclElement = new ExecutorFragment(Types._QuantityKind, OCLstdlibTables.Types._OclElement);\ private static final @NonNull ExecutorFragment _QuantityKindQuantityKind = new ExecutorFragment(Types._QuantityKind, UnitAndQuantityKindTables.Types._QuantityKind);
private static final @NonNull ExecutorFragment _UnitOclAny = new ExecutorFragment(Types._Unit, OCLstdlibTables.Types._OclAny);\ private static final @NonNull ExecutorFragment _Unit__OclElement = new ExecutorFragment(Types._Unit, OCLstdlibTables.Types._OclElement);\ private static final @NonNull ExecutorFragment _UnitUnit = new ExecutorFragment(Types._Unit, UnitAndQuantityKindTables.Types._Unit);\ }
/**\
/**\
/**\
The property descriptors for each property of each type.\ */\ public static class Properties {
public static final @NonNull ExecutorProperty _QuantityKindUnit = new ExecutorPropertyWithImplementation("Unit", Types._QuantityKind, 0, new EcoreLibraryOppositeProperty(UnitAndQuantityKindPackage.Literals.UNITQUANTITY_KIND));\ public static final @NonNull ExecutorProperty _QuantityKinddefinitionURI = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.QUANTITY_KINDDEFINITION_URI, Types._QuantityKind, 1);\ public static final @NonNull ExecutorProperty _QuantityKinddescription = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.QUANTITY_KINDDESCRIPTION, Types._QuantityKind, 2);\ public static final @NonNull ExecutorProperty _QuantityKindname = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.QUANTITY_KINDNAME, Types._QuantityKind, 3);\ public static final @NonNull ExecutorProperty _QuantityKind__symbol = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.QUANTITY_KIND__SYMBOL, Types._QuantityKind, 4);
public static final @NonNull ExecutorProperty _UnitdefinitionURI = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITDEFINITION_URI, Types._Unit, 0);\ public static final @NonNull ExecutorProperty _Unitdescription = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITDESCRIPTION, Types._Unit, 1);\ public static final @NonNull ExecutorProperty _Unitname = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITNAME, Types._Unit, 2);\ public static final @NonNull ExecutorProperty _UnitquantityKind = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITQUANTITY_KIND, Types._Unit, 3);\ public static final @NonNull ExecutorProperty _Unitsymbol = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITSYMBOL, Types._Unit, 4);\ }
/**\
The fragments for all base types in depth order: OclAny first, OclSelf last.\ /\ public static class TypeFragments {\ private static final @NonNull ExecutorFragment[] _QuantityKind =\ {\ Fragments._QuantityKind__OclAny / 0 /,\ Fragments._QuantityKind__OclElement / 1 /,\ Fragments._QuantityKind__QuantityKind / 2 */\ };\ private static final @NonNull int[] __QuantityKind = { 1,1,1 };
private static final @NonNull ExecutorFragment[] _Unit =\ {\ Fragments._UnitOclAny / 0 /,\ Fragments._Unit__OclElement / 1 /,\ Fragments._UnitUnit / 2 /\ };\ private static final @NonNull int[] __Unit = { 1,1,1 };
/**\
public static void init() {}\ }
/**\
The lists of local operations or local operation overrides for each fragment of each type.\ /\ public static class FragmentOperations {\ private static final @NonNull ExecutorOperation[] _QuantityKind__QuantityKind = {};\ private static final @NonNull ExecutorOperation[] _QuantityKindOclAny = {\ OCLstdlibTables.Operations.OclAnylt_gt / _'<>'(OclSelf) /,\ OCLstdlibTables.Operations._OclAny__eq / _'='(OclSelf) /,\ OCLstdlibTables.Operations._OclAny__oclAsSet / oclAsSet() /,\ OCLstdlibTables.Operations._OclAny__oclAsType / oclAsType(TT)(Metaclass(TT)) /,\ OCLstdlibTables.Operations._OclAny__oclIsInState / oclIsInState(OclState) /,\ OCLstdlibTables.Operations._OclAny__oclIsInvalid / oclIsInvalid() /,\ OCLstdlibTables.Operations._OclAny__oclIsKindOf / oclIsKindOf(T)(Metaclass(T)) /,\ OCLstdlibTables.Operations._OclAny__oclIsNew / oclIsNew() /,\ OCLstdlibTables.Operations._OclAny__oclIsTypeOf / oclIsTypeOf(T)(Metaclass(T)) /,\ OCLstdlibTables.Operations._OclAny__oclIsUndefined / oclIsUndefined() /,\ OCLstdlibTables.Operations._OclAny__0_oclLog / oclLog() /,\ OCLstdlibTables.Operations._OclAny__1_oclLog / oclLog(String) /,\ OCLstdlibTables.Operations._OclAny__oclType / oclType() /,\ OCLstdlibTables.Operations._OclAny__toString / toString() /\ };\ private static final @NonNull ExecutorOperation[] _QuantityKind__OclElement = {\ OCLstdlibTables.Operations._OclElement__allInstances / allInstances() /,\ OCLstdlibTables.Operations._OclElement__oclContainer / oclContainer() /,\ OCLstdlibTables.Operations._OclElement__oclContents / oclContents() */\ };
private static final @NonNull ExecutorOperation[] _UnitUnit = {};\ private static final @NonNull ExecutorOperation[] _UnitOclAny = {\ OCLstdlibTables.Operations.OclAnyltgt /* '<>'(OclSelf) */,\ OCLstdlibTables.Operations.OclAnyeq /* '='(OclSelf) */,\ OCLstdlibTables.Operations._OclAnyoclAsSet / oclAsSet() /,\ OCLstdlibTables.Operations._OclAnyoclAsType / oclAsType(TT)(Metaclass(TT)) /,\ OCLstdlibTables.Operations._OclAny__oclIsInState / oclIsInState(OclState) /,\ OCLstdlibTables.Operations._OclAnyoclIsInvalid / oclIsInvalid() /,\ OCLstdlibTables.Operations._OclAnyoclIsKindOf / oclIsKindOf(T)(Metaclass(T)) /,\ OCLstdlibTables.Operations._OclAny__oclIsNew / oclIsNew() /,\ OCLstdlibTables.Operations._OclAnyoclIsTypeOf / oclIsTypeOf(T)(Metaclass(T)) /,\ OCLstdlibTables.Operations._OclAnyoclIsUndefined / oclIsUndefined() /,\ OCLstdlibTables.Operations._OclAny0_oclLog / oclLog() /,\ OCLstdlibTables.Operations._OclAny1_oclLog / oclLog(String) /,\ OCLstdlibTables.Operations._OclAny__oclType / oclType() /,\ OCLstdlibTables.Operations._OclAnytoString / toString() /\ };\ private static final @NonNull ExecutorOperation[] _UnitOclElement = {\ OCLstdlibTables.Operations._OclElement__allInstances / allInstances() /,\ OCLstdlibTables.Operations._OclElementoclContainer / oclContainer() /,\ OCLstdlibTables.Operations._OclElement__oclContents / oclContents() /\ };
/*\
Install the operation descriptors in the fragment descriptors.\ */\ static {\ Fragments._QuantityKindOclAny.initOperations(_QuantityKind__OclAny);\ Fragments._QuantityKindOclElement.initOperations(_QuantityKindOclElement);\ Fragments._QuantityKind__QuantityKind.initOperations(_QuantityKindQuantityKind);
Fragments._UnitOclAny.initOperations(_Unit__OclAny);\ Fragments._UnitOclElement.initOperations(_UnitOclElement);\ Fragments._Unit__Unit.initOperations(_UnitUnit);\ }
public static void init() {}\ }
/**\
The lists of local properties for the local fragment of each type.\ */\ public static class FragmentProperties {\ private static final @NonNull ExecutorProperty[] _QuantityKind = {\ UnitAndQuantityKindTables.Properties._QuantityKindUnit,\ UnitAndQuantityKindTables.Properties._QuantityKind__definitionURI,\ UnitAndQuantityKindTables.Properties._QuantityKinddescription,\ UnitAndQuantityKindTables.Properties._QuantityKind__name,\ UnitAndQuantityKindTables.Properties._QuantityKind__symbol\ };
private static final @NonNull ExecutorProperty[] _Unit = {\ UnitAndQuantityKindTables.Properties._UnitdefinitionURI,\ UnitAndQuantityKindTables.Properties._Unit__description,\ UnitAndQuantityKindTables.Properties._Unitname,\ UnitAndQuantityKindTables.Properties._Unit__quantityKind,\ UnitAndQuantityKindTables.Properties._Unit__symbol\ };
/**\
public static void init() {}\ }
/**\
The lists of enumeration literals for each enumeration.\ */\ public static class EnumerationLiterals {\ /**\
public static void init() {}\ }
static {\ Types.types[0].getClass(); // line 274\ }\ }\ {code}
Since this metamodel is broken into multiple EPackages that map to multiple Java packages, the code generator needs to enforce the static initialization of dependencies before using them to statically construct the values of static, final attributes.
Here's a manually modified version that works for me (look for the NFR) comments.
{code}
/**\
import SysML_ValueTypes_QUDV.SysML_ValueTypes_QUDVPackage;\ import SysML_ValueTypes_QUDV.UnitAndQuantityKind.UnitAndQuantityKindPackage;\ import SysML_ValueTypes_QUDV.UnitAndQuantityKind.UnitAndQuantityKindTables;\ import org.eclipse.jdt.annotation.NonNull;\ import org.eclipse.ocl.examples.domain.ids.ClassId;\ import org.eclipse.ocl.examples.domain.ids.CollectionTypeId;\ import org.eclipse.ocl.examples.domain.ids.IdManager;\ import org.eclipse.ocl.examples.domain.ids.NsURIPackageId;\ import org.eclipse.ocl.examples.domain.ids.TypeId;\ import org.eclipse.ocl.examples.library.ecore.EcoreExecutorPackage;\ import org.eclipse.ocl.examples.library.ecore.EcoreExecutorProperty;\ import org.eclipse.ocl.examples.library.ecore.EcoreExecutorType;\ import org.eclipse.ocl.examples.library.ecore.EcoreLibraryOppositeProperty;\ import org.eclipse.ocl.examples.library.executor.ExecutorFragment;\ import org.eclipse.ocl.examples.library.executor.ExecutorOperation;\ import org.eclipse.ocl.examples.library.executor.ExecutorProperty;\ import org.eclipse.ocl.examples.library.executor.ExecutorPropertyWithImplementation;\ import org.eclipse.ocl.examples.library.executor.ExecutorStandardLibrary;\ import org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables;
/**
before any nested class element. Therefore an access to PACKAGE.getClass() is recommended.\ */\ @SuppressWarnings("nls")\ public class UnitAndQuantityKindTables\ {\ /**\
/**\
/**\
/**\
/**\
The type descriptors for each type.\ */\ public static class Types {\ public static final @NonNull EcoreExecutorType _QuantityKind = new EcoreExecutorType(UnitAndQuantityKindPackage.Literals.QUANTITY_KIND, PACKAGE, 0);\ public static final @NonNull EcoreExecutorType _Unit = new EcoreExecutorType(UnitAndQuantityKindPackage.Literals.UNIT, PACKAGE, 0);
private static final @NonNull EcoreExecutorType[] types = {\ _QuantityKind,\ _Unit\ };
/*\
/**\
The fragment descriptors for the local elements of each type and its supertypes.\ */\ public static class Fragments {\ private static final @NonNull ExecutorFragment _QuantityKindOclAny = new ExecutorFragment(Types._QuantityKind, OCLstdlibTables.Types._OclAny);\ private static final @NonNull ExecutorFragment _QuantityKind__OclElement = new ExecutorFragment(Types._QuantityKind, OCLstdlibTables.Types._OclElement);\ private static final @NonNull ExecutorFragment _QuantityKindQuantityKind = new ExecutorFragment(Types._QuantityKind, UnitAndQuantityKindTables.Types._QuantityKind);
private static final @NonNull ExecutorFragment _UnitOclAny = new ExecutorFragment(Types._Unit, OCLstdlibTables.Types._OclAny);\ private static final @NonNull ExecutorFragment _Unit__OclElement = new ExecutorFragment(Types._Unit, OCLstdlibTables.Types._OclElement);\ private static final @NonNull ExecutorFragment _UnitUnit = new ExecutorFragment(Types._Unit, UnitAndQuantityKindTables.Types._Unit);
// NFR: force initialization.\ public static void init() {\ Types.init();\ }\ }
/**\
/**\
/**\
The property descriptors for each property of each type.\ */\ public static class Properties {
public static final @NonNull ExecutorProperty _QuantityKindUnit = new ExecutorPropertyWithImplementation("Unit", Types._QuantityKind, 0, new EcoreLibraryOppositeProperty(UnitAndQuantityKindPackage.Literals.UNITQUANTITY_KIND));\ public static final @NonNull ExecutorProperty _QuantityKinddefinitionURI = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.QUANTITY_KINDDEFINITION_URI, Types._QuantityKind, 1);\ public static final @NonNull ExecutorProperty _QuantityKinddescription = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.QUANTITY_KINDDESCRIPTION, Types._QuantityKind, 2);\ public static final @NonNull ExecutorProperty _QuantityKindname = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.QUANTITY_KINDNAME, Types._QuantityKind, 3);\ public static final @NonNull ExecutorProperty _QuantityKind__symbol = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.QUANTITY_KIND__SYMBOL, Types._QuantityKind, 4);
public static final @NonNull ExecutorProperty _UnitdefinitionURI = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITDEFINITION_URI, Types._Unit, 0);\ public static final @NonNull ExecutorProperty _Unitdescription = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITDESCRIPTION, Types._Unit, 1);\ public static final @NonNull ExecutorProperty _Unitname = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITNAME, Types._Unit, 2);\ public static final @NonNull ExecutorProperty _UnitquantityKind = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITQUANTITY_KIND, Types._Unit, 3);\ public static final @NonNull ExecutorProperty _Unitsymbol = new EcoreExecutorProperty(UnitAndQuantityKindPackage.Literals.UNITSYMBOL, Types._Unit, 4);
// NFR: force initialization.\ public static void init() {\ Types.init();\ \ }\ }
/**\
The fragments for all base types in depth order: OclAny first, OclSelf last.\ /\ public static class TypeFragments {\ private static final @NonNull ExecutorFragment[] _QuantityKind =\ {\ Fragments._QuantityKind__OclAny / 0 /,\ Fragments._QuantityKind__OclElement / 1 /,\ Fragments._QuantityKind__QuantityKind / 2 */\ };\ private static final @NonNull int[] __QuantityKind = { 1,1,1 };
private static final @NonNull ExecutorFragment[] _Unit =\ {\ Fragments._UnitOclAny / 0 /,\ Fragments._Unit__OclElement / 1 /,\ Fragments._UnitUnit / 2 /\ };\ private static final @NonNull int[] __Unit = { 1,1,1 };
/**\
// NFR: force initialization.\ public static void init() {\ Fragments.init();\ Properties.init();\ \ // NFR: moved from static initializer\ Types._QuantityKind.initFragments(_QuantityKind, QuantityKind);\ Types._Unit.initFragments(_Unit, Unit);\ }\ }
/**\
The lists of local operations or local operation overrides for each fragment of each type.\ /\ public static class FragmentOperations {\ private static final @NonNull ExecutorOperation[] _QuantityKind__QuantityKind = {};\ private static final @NonNull ExecutorOperation[] _QuantityKindOclAny = {\ OCLstdlibTables.Operations.OclAnylt_gt / _'<>'(OclSelf) /,\ OCLstdlibTables.Operations._OclAny__eq / _'='(OclSelf) /,\ OCLstdlibTables.Operations._OclAny__oclAsSet / oclAsSet() /,\ OCLstdlibTables.Operations._OclAny__oclAsType / oclAsType(TT)(Metaclass(TT)) /,\ OCLstdlibTables.Operations._OclAny__oclIsInState / oclIsInState(OclState) /,\ OCLstdlibTables.Operations._OclAny__oclIsInvalid / oclIsInvalid() /,\ OCLstdlibTables.Operations._OclAny__oclIsKindOf / oclIsKindOf(T)(Metaclass(T)) /,\ OCLstdlibTables.Operations._OclAny__oclIsNew / oclIsNew() /,\ OCLstdlibTables.Operations._OclAny__oclIsTypeOf / oclIsTypeOf(T)(Metaclass(T)) /,\ OCLstdlibTables.Operations._OclAny__oclIsUndefined / oclIsUndefined() /,\ OCLstdlibTables.Operations._OclAny__0_oclLog / oclLog() /,\ OCLstdlibTables.Operations._OclAny__1_oclLog / oclLog(String) /,\ OCLstdlibTables.Operations._OclAny__oclType / oclType() /,\ OCLstdlibTables.Operations._OclAny__toString / toString() /\ };\ private static final @NonNull ExecutorOperation[] _QuantityKind__OclElement = {\ OCLstdlibTables.Operations._OclElement__allInstances / allInstances() /,\ OCLstdlibTables.Operations._OclElement__oclContainer / oclContainer() /,\ OCLstdlibTables.Operations._OclElement__oclContents / oclContents() */\ };
private static final @NonNull ExecutorOperation[] _UnitUnit = {};\ private static final @NonNull ExecutorOperation[] _UnitOclAny = {\ OCLstdlibTables.Operations.OclAnyltgt /* '<>'(OclSelf) */,\ OCLstdlibTables.Operations.OclAnyeq /* '='(OclSelf) */,\ OCLstdlibTables.Operations._OclAnyoclAsSet / oclAsSet() /,\ OCLstdlibTables.Operations._OclAnyoclAsType / oclAsType(TT)(Metaclass(TT)) /,\ OCLstdlibTables.Operations._OclAny__oclIsInState / oclIsInState(OclState) /,\ OCLstdlibTables.Operations._OclAnyoclIsInvalid / oclIsInvalid() /,\ OCLstdlibTables.Operations._OclAnyoclIsKindOf / oclIsKindOf(T)(Metaclass(T)) /,\ OCLstdlibTables.Operations._OclAny__oclIsNew / oclIsNew() /,\ OCLstdlibTables.Operations._OclAnyoclIsTypeOf / oclIsTypeOf(T)(Metaclass(T)) /,\ OCLstdlibTables.Operations._OclAnyoclIsUndefined / oclIsUndefined() /,\ OCLstdlibTables.Operations._OclAny0_oclLog / oclLog() /,\ OCLstdlibTables.Operations._OclAny1_oclLog / oclLog(String) /,\ OCLstdlibTables.Operations._OclAny__oclType / oclType() /,\ OCLstdlibTables.Operations._OclAnytoString / toString() /\ };\ private static final @NonNull ExecutorOperation[] _UnitOclElement = {\ OCLstdlibTables.Operations._OclElement__allInstances / allInstances() /,\ OCLstdlibTables.Operations._OclElementoclContainer / oclContainer() /,\ OCLstdlibTables.Operations._OclElement__oclContents / oclContents() /\ };
/*\
Install the operation descriptors in the fragment descriptors.\ */\ static {\ // NFR: moved to init();\ }\ \ // NFR: force initialization.\ public static void init() {\ TypeFragments.init();\ \ // NFR: moved from the static initializer\ Fragments._QuantityKindOclAny.initOperations(_QuantityKind__OclAny);\ Fragments._QuantityKindOclElement.initOperations(_QuantityKindOclElement);\ Fragments._QuantityKind__QuantityKind.initOperations(_QuantityKindQuantityKind);
Fragments._UnitOclAny.initOperations(_Unit__OclAny);\ Fragments._UnitOclElement.initOperations(_UnitOclElement);\ Fragments._Unit__Unit.initOperations(_UnitUnit);\ }\ }
/**\
The lists of local properties for the local fragment of each type.\ */\ public static class FragmentProperties {\ private static final @NonNull ExecutorProperty[] _QuantityKind = {\ UnitAndQuantityKindTables.Properties._QuantityKindUnit,\ UnitAndQuantityKindTables.Properties._QuantityKind__definitionURI,\ UnitAndQuantityKindTables.Properties._QuantityKinddescription,\ UnitAndQuantityKindTables.Properties._QuantityKind__name,\ UnitAndQuantityKindTables.Properties._QuantityKind__symbol\ };
private static final @NonNull ExecutorProperty[] _Unit = {\ UnitAndQuantityKindTables.Properties._UnitdefinitionURI,\ UnitAndQuantityKindTables.Properties._Unit__description,\ UnitAndQuantityKindTables.Properties._Unitname,\ UnitAndQuantityKindTables.Properties._Unit__quantityKind,\ UnitAndQuantityKindTables.Properties._Unit__symbol\ };
/**\
// NFR: force initialization.\ public static void init() {\ TypeFragments.init();\ \ // NFR: moved from static initializer\ Fragments._QuantityKindQuantityKind.initProperties(_QuantityKind);\ Fragments._UnitUnit.initProperties(_Unit);\ }\ }
/**\
The lists of enumeration literals for each enumeration.\ */\ public static class EnumerationLiterals {\ /**\
public static void init() {}\ }
// NFR: force initialization.\ static {\ Types.init();\ }\ }\ {code}
SysML_ValueTypes_QUDV.ecore