public void addAllTypes(org.eclipse.ocl.pivot.@NonNull Package pkge) { if (accepts(PivotPackage.Literals.CLASS)) { CompletePackage completePackage = environmentFactory.getMetamodelManager().getCompletePackage(pkge); String name2 = name; if (name2 != null) { org.eclipse.ocl.pivot.Class type = completePackage.getMemberType(name2); if (type != null) { addNamedElement(type); } else { completePackage = environmentFactory.getCompleteModel().getPrimitiveCompletePackage(); type = completePackage.getMemberType(name2); if (type != null) { addNamedElement(type); } } } else { for (CompleteClass completeClass : completePackage.getOwnedCompleteClasses()) { addNamedElement(completeClass.getPrimaryClass()); } completePackage = environmentFactory.getCompleteModel().getPrimitiveCompletePackage(); for (CompleteClass completeClass : completePackage.getOwnedCompleteClasses()) { addNamedElement(completeClass.getPrimaryClass()); } } } }
public void addRootPackages() { CompleteModelInternal completeModel = environmentFactory.getCompleteModel(); String name2 = name; if (name2 != null) { CompletePackage rootCompletePackage = completeModel.getOwnedCompletePackage(name2); if (rootCompletePackage != null) { addNamedElement(rootCompletePackage); } CompletePackage completePackage = completeModel.getCompletePackageByURI(name2); if (completePackage != null) { addElement(name2, completePackage); } } else { for (CompletePackage rootCompletePackage : completeModel.getOwnedCompletePackages()) { if (rootCompletePackage != null) { addNamedElement(rootCompletePackage); } } for (CompletePackage completePackage : completeModel.getAllCompletePackagesWithUris()) { String nsURI = completePackage.getURI(); if (nsURI != null) { addElement(nsURI, completePackage); } } } }
public void addNamedElements(/*@NonNull*/ Iterable<? extends Nameable> namedElements) { for (Nameable namedElement : namedElements) { if (namedElement != null) { addNamedElement(namedElement); } } }
public void addAllOperations( org.eclipse.ocl.pivot.@NonNull Class type, @Nullable FeatureFilter featureFilter) { if (accepts( PivotPackage.Literals.ITERATION) // If ITERATION is acceptable then so too is OPERATION && (requiredType != PivotPackage.Literals .NAMESPACE)) { // Don't really want operations when looking for NAMESPACE assert environmentFactory.getMetamodelManager().isTypeServeable(type); type = PivotUtil.getUnspecializedTemplateableElement(type); CompleteClass completeClass = environmentFactory.getMetamodelManager().getCompleteClass(type); String name2 = name; if (name2 != null) { for (Operation operation : completeClass.getOperations(featureFilter, name2)) { if ((operation != null) /*&& (operation.isStatic() == selectStatic)*/) { addElement(name2, operation); } } } else { for (Operation operation : completeClass.getOperations(featureFilter)) { if ((operation != null) /*&& (operation.isStatic() == selectStatic)*/) { addNamedElement(operation); } } } } }
public void addAllStates(@NonNull Type type) { if (accepts(PivotPackage.Literals.STATE)) { assert environmentFactory.getMetamodelManager().isTypeServeable(type); CompleteClass completeClass = environmentFactory.getCompleteModel().getCompleteClass(type); String name2 = name; if (name2 != null) { for (State state : completeClass.getStates(name2)) { if (state != null) { addNamedElement(state); } } } else { for (State state : completeClass.getStates()) { if (state != null) { addNamedElement(state); } } } } }
public void addAllProperties( org.eclipse.ocl.pivot.@NonNull Class type, @Nullable FeatureFilter featureFilter) { if (accepts(PivotPackage.Literals.PROPERTY) && (requiredType != PivotPackage.Literals .NAMESPACE)) { // Don't really want properties when looking for NAMESPACE assert environmentFactory.getMetamodelManager().isTypeServeable(type); CompleteClass completeClass = environmentFactory.getMetamodelManager().getCompleteClass(type); String name2 = name; if (name2 != null) { for (Property property : completeClass.getProperties(featureFilter, name2)) { if (property != null) { addNamedElement(property); } } } else { for (Property property : completeClass.getProperties(featureFilter)) { if (property != null) { addNamedElement(property); } } } } }
public void addAllPrecedences(@NonNull Library pivot) { if (accepts(PivotPackage.Literals.PRECEDENCE)) { String name2 = name; if (name2 != null) { for (Precedence precedence : pivot.getOwnedPrecedences()) { if (name2.equals(precedence.getName())) { addElement(name2, precedence); } } } else { for (Precedence precedence : pivot.getOwnedPrecedences()) { if (precedence != null) { addNamedElement(precedence); } } } } }
public void addAllParameters(@NonNull Operation pivot) { if (accepts(PivotPackage.Literals.PARAMETER)) { String name2 = name; if (name2 != null) { for (Parameter parameter : pivot.getOwnedParameters()) { if (name2.equals(parameter.getName())) { addElement(name2, parameter); } } } else { for (Parameter parameter : pivot.getOwnedParameters()) { if (parameter != null) { addNamedElement(parameter); } } } } }
public void addAllPackages(@NonNull Model root) { if (accepts(PivotPackage.Literals.PACKAGE)) { String name2 = name; if (name2 != null) { for (org.eclipse.ocl.pivot.Package pkge : root.getOwnedPackages()) { if ((pkge != null) && name2.equals(pkge.getName())) { addElement(name2, pkge); } } } else { for (org.eclipse.ocl.pivot.Package pkge : root.getOwnedPackages()) { if (pkge != null) { addNamedElement(environmentFactory.getMetamodelManager().getPrimaryPackage(pkge)); } } } } }
public void addAllEnumerationLiterals(org.eclipse.ocl.pivot.Enumeration pivot) { if (accepts(PivotPackage.Literals.ENUMERATION_LITERAL)) { String name2 = name; if (name2 != null) { for (EnumerationLiteral literal : pivot.getOwnedLiterals()) { if ((literal != null) && name2.equals(literal.getName())) { addElement(name2, literal); } } } else { for (EnumerationLiteral literal : pivot.getOwnedLiterals()) { if (literal != null) { addNamedElement(literal); } } } } }
public void addAllPackages(org.eclipse.ocl.pivot.@NonNull Package pkge) { if (accepts(PivotPackage.Literals.PACKAGE)) { CompletePackage parentCompletePackage = environmentFactory.getMetamodelManager().getCompletePackage(pkge); String name2 = name; if (name2 != null) { CompletePackage completePackage = parentCompletePackage.getOwnedCompletePackage(name2); if (completePackage != null) { addElement(name2, completePackage); } } else { for (CompletePackage completePackage : parentCompletePackage.getOwnedCompletePackages()) { if (completePackage != null) { addNamedElement(completePackage); } } } } }
public void addAllTemplateParameters(@NonNull TemplateableElement pivot) { if (accepts(PivotPackage.Literals.TYPE)) { TemplateSignature templateSignature = pivot.getOwnedSignature(); if (templateSignature != null) { String name2 = name; List<TemplateParameter> templateParameters = templateSignature.getOwnedParameters(); if (name2 != null) { for (TemplateParameter templateParameter : templateParameters) { if ((templateParameter != null) && name2.equals(templateParameter.getName())) { addElement(name2, templateParameter); } } } else { for (TemplateParameter templateParameter : templateParameters) { if (templateParameter != null) { addNamedElement(templateParameter); } } } } } }
// This copy here to preserve API until failure of clients to update understood. public void addNamedElement(/*@NonNull*/ NamedElement namedElement) { addNamedElement((Nameable) namedElement); }