org.eclipse.ocl.examples.codegen.oclinecore
Class OCLinEcoreTablesUtils

java.lang.Object
  extended by org.eclipse.ocl.examples.codegen.oclinecore.OCLinEcoreTablesUtils
Direct Known Subclasses:
OCLinEcoreTables

public class OCLinEcoreTablesUtils
extends java.lang.Object


Nested Class Summary
static class OCLinEcoreTablesUtils.CodeGenString
           
 class OCLinEcoreTablesUtils.DeclareParameterTypeVisitor
           
 class OCLinEcoreTablesUtils.EmitLiteralVisitor
           
 class OCLinEcoreTablesUtils.EmitQualifiedLiteralVisitor
           
 
Field Summary
protected  java.lang.Iterable<Class> activeClassesSortedByName
           
protected  OCLinEcoreTablesUtils.DeclareParameterTypeVisitor declareParameterTypeVisitor
           
protected  OCLinEcoreTablesUtils.EmitLiteralVisitor emitLiteralVisitor
           
protected  OCLinEcoreTablesUtils.EmitQualifiedLiteralVisitor emitQualifiedLiteralVisitor
           
protected  org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage
           
protected  MetaModelManager metaModelManager
           
static java.util.Comparator<Nameable> nameComparator
           
protected  Package pPackage
           
static java.util.Comparator<Property> propertyComparator
           
protected  OCLinEcoreTablesUtils.CodeGenString s
           
static java.util.Comparator<Operation> signatureComparator
           
 java.util.Comparator<DomainParameterTypes> templateBindingNameComparator
           
protected  java.util.Map<DomainParameterTypes,java.lang.String> templateBindingsNames
           
 
Constructor Summary
protected OCLinEcoreTablesUtils(org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)
           
 
Method Summary
protected  java.lang.Iterable<Class> getActiveClassesSortedByName(Package pPackage)
           
protected  java.util.Set<? extends Type> getActiveTypes(Package pPackage)
           
protected  java.lang.Iterable<Class> getAllProperSupertypesSortedByName(Class pClass)
           
protected  int getAllSuperClasses(java.util.Map<Class,java.lang.Integer> results, Class aClass)
           
protected  java.util.List<Class> getAllSupertypesSortedByName(Class pClass)
           
protected  Package getExtendedPackage(Package pPackage)
           
 org.eclipse.emf.codegen.ecore.genmodel.GenPackage getGenPackage()
           
protected  org.eclipse.emf.codegen.ecore.genmodel.GenPackage getGenPackage(DomainPackage asPackage)
           
protected  org.eclipse.emf.codegen.ecore.genmodel.GenPackage getGenPackage(Type type)
           
protected  java.lang.String getImplementationName(Operation operation)
           
protected  java.lang.Iterable<Operation> getLocalOperationsSortedBySignature(Class pClass)
           
protected  java.util.List<Property> getLocalPropertiesSortedByName(Class pClass)
           
protected  java.util.LinkedHashSet<Operation> getOperations(Type type)
           
protected  Operation getOverloadOp(Class pClass, Operation baseOp)
           
protected  Package getPivotPackage(org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)
           
protected  java.util.LinkedHashSet<Property> getProperties(Type type)
           
protected  java.lang.String getQualifiedTablesClassName(Package pPackage)
           
protected  java.lang.String getQualifiedTablesClassName(Type type)
           
protected  java.lang.String getSharedLibrary()
           
static java.lang.String getSignature(Operation anOperation)
           
 java.lang.String getTablesClassName()
           
protected  java.lang.String getTablesClassName(org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)
           
protected  java.lang.String getTemplateBindingsName(DomainParameterTypes templateBindings)
           
protected  java.lang.Boolean hasEcore(Property property)
          Return true if property has an Ecore counterpart.
protected  java.lang.Boolean hasEcore(Type type)
          Return true if type has an Ecore counterpart.
protected  java.lang.Boolean hasSharedLibrary()
           
static java.lang.Boolean isBuiltInType(Type type)
           
protected  boolean isLambdaParameterList(ParametersId parametersId)
           
protected  boolean isProperty(Property prop)
           
protected  void mergeLibrary(Package primaryPackage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

templateBindingNameComparator

public java.util.Comparator<DomainParameterTypes> templateBindingNameComparator

nameComparator

public static java.util.Comparator<Nameable> nameComparator

propertyComparator

public static java.util.Comparator<Property> propertyComparator

signatureComparator

public static java.util.Comparator<Operation> signatureComparator

s

@NonNull
protected final OCLinEcoreTablesUtils.CodeGenString s

genPackage

@NonNull
protected final org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage

metaModelManager

@NonNull
protected final MetaModelManager metaModelManager

pPackage

@NonNull
protected final Package pPackage

declareParameterTypeVisitor

@NonNull
protected final OCLinEcoreTablesUtils.DeclareParameterTypeVisitor declareParameterTypeVisitor

emitLiteralVisitor

@NonNull
protected final OCLinEcoreTablesUtils.EmitLiteralVisitor emitLiteralVisitor

emitQualifiedLiteralVisitor

@NonNull
protected final OCLinEcoreTablesUtils.EmitQualifiedLiteralVisitor emitQualifiedLiteralVisitor

activeClassesSortedByName

@NonNull
protected final java.lang.Iterable<Class> activeClassesSortedByName

templateBindingsNames

@NonNull
protected final java.util.Map<DomainParameterTypes,java.lang.String> templateBindingsNames
Constructor Detail

OCLinEcoreTablesUtils

protected OCLinEcoreTablesUtils(@NonNull
                                org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)
Method Detail

isBuiltInType

@NonNull
public static java.lang.Boolean isBuiltInType(@NonNull
                                                      Type type)

getActiveClassesSortedByName

@NonNull
protected java.lang.Iterable<Class> getActiveClassesSortedByName(@NonNull
                                                                         Package pPackage)

getActiveTypes

@NonNull
protected java.util.Set<? extends Type> getActiveTypes(@NonNull
                                                               Package pPackage)

getAllProperSupertypesSortedByName

@NonNull
protected java.lang.Iterable<Class> getAllProperSupertypesSortedByName(@NonNull
                                                                               Class pClass)

getAllSupertypesSortedByName

@NonNull
protected java.util.List<Class> getAllSupertypesSortedByName(@NonNull
                                                                     Class pClass)

getAllSuperClasses

protected int getAllSuperClasses(@NonNull
                                 java.util.Map<Class,java.lang.Integer> results,
                                 @NonNull
                                 Class aClass)

getExtendedPackage

@Nullable
protected Package getExtendedPackage(@NonNull
                                              Package pPackage)

getGenPackage

@NonNull
public org.eclipse.emf.codegen.ecore.genmodel.GenPackage getGenPackage()

getGenPackage

@Nullable
protected org.eclipse.emf.codegen.ecore.genmodel.GenPackage getGenPackage(@NonNull
                                                                                   Type type)

getGenPackage

@Nullable
protected org.eclipse.emf.codegen.ecore.genmodel.GenPackage getGenPackage(@NonNull
                                                                                   DomainPackage asPackage)

getImplementationName

@NonNull
protected java.lang.String getImplementationName(@NonNull
                                                         Operation operation)

getLocalOperationsSortedBySignature

@NonNull
protected java.lang.Iterable<Operation> getLocalOperationsSortedBySignature(@NonNull
                                                                                    Class pClass)

getLocalPropertiesSortedByName

@NonNull
protected java.util.List<Property> getLocalPropertiesSortedByName(@NonNull
                                                                          Class pClass)

getOperations

@NonNull
protected java.util.LinkedHashSet<Operation> getOperations(@NonNull
                                                                   Type type)

getOverloadOp

@NonNull
protected Operation getOverloadOp(@NonNull
                                          Class pClass,
                                          @NonNull
                                          Operation baseOp)

getPivotPackage

protected Package getPivotPackage(@NonNull
                                  org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)

getProperties

@NonNull
protected java.util.LinkedHashSet<Property> getProperties(@NonNull
                                                                  Type type)

getQualifiedTablesClassName

@NonNull
protected java.lang.String getQualifiedTablesClassName(@NonNull
                                                               Type type)

getQualifiedTablesClassName

@NonNull
protected java.lang.String getQualifiedTablesClassName(@NonNull
                                                               Package pPackage)

getSharedLibrary

@NonNull
protected java.lang.String getSharedLibrary()

getSignature

@NonNull
public static java.lang.String getSignature(@NonNull
                                                    Operation anOperation)

getTablesClassName

@NonNull
public java.lang.String getTablesClassName()

getTablesClassName

@NonNull
protected java.lang.String getTablesClassName(@NonNull
                                                      org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)

getTemplateBindingsName

@NonNull
protected java.lang.String getTemplateBindingsName(@NonNull
                                                           DomainParameterTypes templateBindings)

hasEcore

@NonNull
protected java.lang.Boolean hasEcore(@NonNull
                                             Property property)
Return true if property has an Ecore counterpart. Non-navigable opposites may have a Property but no Ecore EReference.


hasSharedLibrary

@NonNull
protected java.lang.Boolean hasSharedLibrary()

isLambdaParameterList

protected boolean isLambdaParameterList(@NonNull
                                        ParametersId parametersId)

isProperty

protected boolean isProperty(@NonNull
                             Property prop)

hasEcore

@NonNull
protected java.lang.Boolean hasEcore(@NonNull
                                             Type type)
Return true if type has an Ecore counterpart. The Standard Library genmodel has no Ecore types, unless the Pivot model is also in use.


mergeLibrary

protected void mergeLibrary(@NonNull
                            Package primaryPackage)