public class PivotUtil extends DomainUtil
Modifier and Type | Class and Description |
---|---|
static class |
PivotUtil.PrecedenceComparator
'Highest' precedence first
|
static class |
PivotUtil.TemplateParameterSubstitutionComparator
In TemplateSignature order.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SCHEME_PIVOT |
NAMEABLE_COMPARATOR
Constructor and Description |
---|
PivotUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
appendMultiplicity(java.lang.StringBuilder s,
long lower,
long upper) |
static void |
checkResourceErrors(java.lang.String message,
org.eclipse.emf.ecore.resource.Resource resource) |
static boolean |
conformsTo(org.eclipse.emf.ecore.EClassifier targetType,
org.eclipse.emf.ecore.EClassifier contentType) |
static boolean |
conformsTo(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature,
org.eclipse.emf.ecore.EClassifier contentType) |
static java.lang.String |
convertFromOCLString(java.lang.String javaString)
Deprecated.
|
static java.lang.String |
convertToOCLString(java.lang.String theString)
Deprecated.
|
static ExpressionInOCL |
createExpressionInOCLError(java.lang.String string) |
static void |
debugObjectUsage(java.lang.String prefix,
org.eclipse.emf.ecore.EObject element) |
static boolean |
debugWellContainedness(Type type) |
static MetaModelManager |
findMetaModelManager(org.eclipse.emf.ecore.EObject eObject) |
static MetaModelManager |
findMetaModelManager(org.eclipse.emf.ecore.resource.Resource resource) |
static MetaModelManager |
findMetaModelManager(org.eclipse.emf.ecore.resource.ResourceSet resourceSet) |
static Type |
findTypeOf(MetaModelManager metaModelManager,
org.eclipse.emf.ecore.EClassifier eClass) |
static java.lang.String |
formatResourceDiagnostics(java.util.List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> diagnostics,
java.lang.String messagePrefix,
java.lang.String newLine) |
static <T> T |
getAdapter(java.lang.Class<T> adapterClass,
java.util.List<org.eclipse.emf.common.notify.Adapter> eAdapters) |
static <T> T |
getAdapter(java.lang.Class<T> adapterClass,
org.eclipse.emf.common.notify.Notifier notifier) |
static java.util.List<java.util.List<TemplateParameter>> |
getAllTemplateParameterLists(org.eclipse.emf.ecore.EObject eObject) |
static java.util.List<TemplateParameter> |
getAllTemplateParameters(java.util.Collection<TemplateBinding> templateBindings) |
static java.util.List<TemplateParameter> |
getAllTemplateParameters(org.eclipse.emf.ecore.EObject eObject) |
static java.util.Map<TemplateParameter,ParameterableElement> |
getAllTemplateParametersAsBindings(org.eclipse.emf.ecore.EObject eObject) |
static java.util.Map<TemplateParameter,ParameterableElement> |
getAllTemplateParameterSubstitutions(java.util.Map<TemplateParameter,ParameterableElement> map,
TemplateableElement templateableElement) |
static java.util.Map<TemplateParameter,ParameterableElement> |
getAllTemplateParameterSubstitutions(java.util.Map<TemplateParameter,ParameterableElement> bindings,
Type argumentType,
LambdaType lambdaType) |
static Attribution |
getAttribution(org.eclipse.emf.ecore.EObject eObject) |
static Type |
getBehavioralType(Type type)
Deprecated.
|
static Type |
getBehavioralType(TypedElement element)
Deprecated.
|
static java.lang.String |
getBody(OpaqueExpression specification) |
static CollectionKind |
getCollectionKind(CollectionType collectionType) |
static java.lang.String |
getConstraintTypeName(Constraint constraint) |
static java.lang.String |
getConstraintTypeName(OpaqueExpression expression) |
static Namespace |
getContainingNamespace(org.eclipse.emf.ecore.EObject element) |
static Package |
getContainingPackage(org.eclipse.emf.ecore.EObject element) |
static Root |
getContainingRoot(org.eclipse.emf.ecore.EObject element) |
static Type |
getContainingType(org.eclipse.emf.ecore.EObject element) |
static int |
getContainmentDepth(org.eclipse.emf.ecore.EObject eObject)
Return the number of containers of eObject, 0 if eObject is a root.
|
static ExpressionInOCL |
getExpressionInOCL(NamedElement contextElement,
OpaqueExpression specification)
Return an OCL AST from a ValueSpecification in the context of a NamedElement.
|
static ExpressionInOCL |
getExpressionInOCL(NamedElement contextElement,
java.lang.String expression)
Return an OCL AST from a string in the context of a NamedElement.
|
static Element |
getLowerBound(Element element)
Return the lower bound for scope resolution lookups in element.
|
static java.lang.String |
getMessage(OpaqueExpression specification) |
static MetaModelManager |
getMetaModelManager(org.eclipse.emf.ecore.resource.Resource resource) |
static <T extends DomainNamedElement> |
getNamedElement(java.lang.Iterable<T> elements,
java.lang.String name)
Deprecated.
|
static Namespace |
getNamespace(org.eclipse.emf.ecore.EObject element) |
static org.eclipse.emf.common.util.URI |
getNonPivotURI(org.eclipse.emf.common.util.URI uri) |
static java.lang.String |
getNsURI(DomainElement element)
Return a URI based on the nsURI of the immediate parent package.
|
static java.lang.String |
getNsURI(org.eclipse.emf.ecore.EModelElement element)
Return a URI based on the nsURI of the immediate parent package.
|
static Type |
getOwningType(Feature feature) |
static Package |
getPackage(org.eclipse.emf.ecore.EObject object) |
static <T extends Element> |
getPivot(java.lang.Class<T> pivotClass,
Pivotable pivotableElement) |
static org.eclipse.emf.common.util.URI |
getPivotURI(org.eclipse.emf.common.util.URI uri) |
static Feature |
getReferredFeature(CallExp callExp) |
static Operation |
getReferredOperation(CallExp callExp) |
static java.lang.String |
getStereotype(Constraint object) |
static java.util.List<ParameterableElement> |
getTemplateParameterables(TemplateableElement templateableElement) |
static java.util.List<TemplateParameter> |
getTemplateParameters(TemplateableElement templateableElement) |
static Type |
getType(Type type) |
static Type |
getType(TypedElement typedElement) |
static java.util.List<Type> |
getTypeTemplateParameterables(TemplateableElement templateableElement) |
static <T extends TemplateableElement> |
getUnspecializedTemplateableElement(T templateableElement) |
static boolean |
isLibraryType(Type type) |
static boolean |
isPivotURI(org.eclipse.emf.common.util.URI uri) |
static boolean |
isValidIdentifier(java.lang.String value) |
static void |
localizeSpecializations(org.eclipse.emf.ecore.resource.Resource pivotResource)
Create local copies of specializations in a local orphanage so that pivotResource
can be saved without dangling references to the global orphanage.
|
static <T extends org.eclipse.emf.ecore.EObject> |
refreshList(java.util.List<? super T> oldElements,
java.util.List<? extends T> newElements) |
static <T extends org.eclipse.emf.ecore.EObject> |
refreshSet(java.util.List<? super T> oldElements,
java.util.Collection<? extends T> newElements) |
static void |
setBody(ExpressionInOCL expressionInOCL,
OCLExpression oclExpression,
java.lang.String stringExpression)
Define oclExpression as the bodyExpression of an expressionInOCL, and if non-null
also define stringExpression as the OCL-languaged body.
|
static void |
setMessage(ExpressionInOCL expressionInOCL,
OCLExpression oclExpression,
java.lang.String stringExpression)
Define oclExpression as the bodyExpression of an expressionInOCL, and if non-null
also define stringExpression as the OCL-languaged body.
|
static boolean |
setParserContext(BaseResource resource,
org.eclipse.emf.ecore.EObject eObject,
java.lang.Object... todoParameters)
Configure resource to support parsing in the context of an eObject.
|
static char |
toHex(int nibble)
Deprecated.
|
bind, createNumberFromString, debugEventType, debugFullName, debugSimpleName, formatMultiplicity, getLabel, getLabel, getLambdaParameterTypes, getOperationParameterTypes, getSafeName, nonNullEMF, nonNullModel, nonNullPivot, nonNullState, suppressThrowWarnings
public static final java.lang.String SCHEME_PIVOT
public static void appendMultiplicity(@NonNull java.lang.StringBuilder s, long lower, long upper)
public static void checkResourceErrors(@NonNull java.lang.String message, @NonNull org.eclipse.emf.ecore.resource.Resource resource) throws ParserException
ParserException
public static boolean conformsTo(@Nullable org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, @NonNull org.eclipse.emf.ecore.EClassifier contentType)
public static boolean conformsTo(@Nullable org.eclipse.emf.ecore.EClassifier targetType, @NonNull org.eclipse.emf.ecore.EClassifier contentType)
@Deprecated @NonNull public static java.lang.String convertFromOCLString(@NonNull java.lang.String javaString)
@Deprecated public static java.lang.String convertToOCLString(java.lang.String theString)
@NonNull public static ExpressionInOCL createExpressionInOCLError(@NonNull java.lang.String string)
public static void debugObjectUsage(java.lang.String prefix, org.eclipse.emf.ecore.EObject element)
public static boolean debugWellContainedness(Type type)
@Nullable public static MetaModelManager findMetaModelManager(@NonNull org.eclipse.emf.ecore.EObject eObject)
@Nullable public static MetaModelManager findMetaModelManager(@NonNull org.eclipse.emf.ecore.resource.Resource resource)
public static MetaModelManager findMetaModelManager(@NonNull org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
public static Type findTypeOf(@NonNull MetaModelManager metaModelManager, @NonNull org.eclipse.emf.ecore.EClassifier eClass)
public static java.lang.String formatResourceDiagnostics(@NonNull java.util.List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> diagnostics, @NonNull java.lang.String messagePrefix, @NonNull java.lang.String newLine)
public static <T> T getAdapter(@NonNull java.lang.Class<T> adapterClass, @NonNull org.eclipse.emf.common.notify.Notifier notifier)
public static <T> T getAdapter(@NonNull java.lang.Class<T> adapterClass, @NonNull java.util.List<org.eclipse.emf.common.notify.Adapter> eAdapters)
public static java.util.List<TemplateParameter> getAllTemplateParameters(java.util.Collection<TemplateBinding> templateBindings)
public static java.util.List<java.util.List<TemplateParameter>> getAllTemplateParameterLists(org.eclipse.emf.ecore.EObject eObject)
public static java.util.List<TemplateParameter> getAllTemplateParameters(org.eclipse.emf.ecore.EObject eObject)
@Nullable public static java.util.Map<TemplateParameter,ParameterableElement> getAllTemplateParametersAsBindings(@NonNull org.eclipse.emf.ecore.EObject eObject)
@Nullable public static java.util.Map<TemplateParameter,ParameterableElement> getAllTemplateParameterSubstitutions(@Nullable java.util.Map<TemplateParameter,ParameterableElement> map, @Nullable TemplateableElement templateableElement)
public static java.util.Map<TemplateParameter,ParameterableElement> getAllTemplateParameterSubstitutions(java.util.Map<TemplateParameter,ParameterableElement> bindings, Type argumentType, LambdaType lambdaType)
@NonNull public static Attribution getAttribution(@NonNull org.eclipse.emf.ecore.EObject eObject)
@Deprecated @NonNull public static Type getBehavioralType(@NonNull Type type)
@Deprecated @NonNull public static Type getBehavioralType(@NonNull TypedElement element)
public static java.lang.String getBody(OpaqueExpression specification)
public static CollectionKind getCollectionKind(CollectionType collectionType)
public static java.lang.String getConstraintTypeName(@NonNull OpaqueExpression expression)
public static java.lang.String getConstraintTypeName(@NonNull Constraint constraint)
public static Namespace getContainingNamespace(org.eclipse.emf.ecore.EObject element)
public static Package getContainingPackage(org.eclipse.emf.ecore.EObject element)
public static Root getContainingRoot(org.eclipse.emf.ecore.EObject element)
@Nullable public static Type getContainingType(@Nullable org.eclipse.emf.ecore.EObject element)
public static int getContainmentDepth(org.eclipse.emf.ecore.EObject eObject)
@Nullable public static ExpressionInOCL getExpressionInOCL(@NonNull NamedElement contextElement, @NonNull OpaqueExpression specification)
@Nullable public static ExpressionInOCL getExpressionInOCL(@NonNull NamedElement contextElement, @NonNull java.lang.String expression)
@Deprecated public static <T extends DomainNamedElement> T getNamedElement(java.lang.Iterable<T> elements, java.lang.String name)
@Nullable public static Package getPackage(@NonNull org.eclipse.emf.ecore.EObject object)
@NonNull public static Element getLowerBound(@NonNull Element element)
@Nullable public static java.lang.String getMessage(@NonNull OpaqueExpression specification)
@NonNull public static MetaModelManager getMetaModelManager(@NonNull org.eclipse.emf.ecore.resource.Resource resource)
@Nullable public static Namespace getNamespace(@Nullable org.eclipse.emf.ecore.EObject element)
@NonNull public static org.eclipse.emf.common.util.URI getNonPivotURI(@NonNull org.eclipse.emf.common.util.URI uri)
public static java.lang.String getNsURI(@NonNull org.eclipse.emf.ecore.EModelElement element)
public static java.lang.String getNsURI(@NonNull DomainElement element)
@Nullable public static <T extends Element> T getPivot(@NonNull java.lang.Class<T> pivotClass, @Nullable Pivotable pivotableElement)
@NonNull public static org.eclipse.emf.common.util.URI getPivotURI(@NonNull org.eclipse.emf.common.util.URI uri)
public static java.util.List<TemplateParameter> getTemplateParameters(TemplateableElement templateableElement)
public static java.lang.String getStereotype(@NonNull Constraint object)
public static java.util.List<ParameterableElement> getTemplateParameterables(TemplateableElement templateableElement)
@Nullable public static Type getType(@Nullable TypedElement typedElement)
@NonNull public static java.util.List<Type> getTypeTemplateParameterables(@NonNull TemplateableElement templateableElement)
@NonNull public static <T extends TemplateableElement> T getUnspecializedTemplateableElement(@NonNull T templateableElement)
public static boolean isLibraryType(@NonNull Type type)
public static boolean isPivotURI(@NonNull org.eclipse.emf.common.util.URI uri)
public static boolean isValidIdentifier(@Nullable java.lang.String value)
public static void localizeSpecializations(org.eclipse.emf.ecore.resource.Resource pivotResource)
public static <T extends org.eclipse.emf.ecore.EObject> void refreshList(@Nullable java.util.List<? super T> oldElements, @Nullable java.util.List<? extends T> newElements)
public static <T extends org.eclipse.emf.ecore.EObject> void refreshSet(@Nullable java.util.List<? super T> oldElements, @Nullable java.util.Collection<? extends T> newElements)
public static void setBody(@NonNull ExpressionInOCL expressionInOCL, @Nullable OCLExpression oclExpression, @Nullable java.lang.String stringExpression)
public static void setMessage(@NonNull ExpressionInOCL expressionInOCL, @Nullable OCLExpression oclExpression, @Nullable java.lang.String stringExpression)
public static boolean setParserContext(@NonNull BaseResource resource, @NonNull org.eclipse.emf.ecore.EObject eObject, java.lang.Object... todoParameters) throws ParserException
ParserException
- if eObject cannot be converted to a Pivot element@Deprecated public static char toHex(int nibble)
Properties