## org.eclipse.ocl.ecore.internal
Class EcoreForeignMethods

    java.lang.Object
      org.eclipse.ocl.ecore.internal.EcoreForeignMethods

    public class EcoreForeignMethods

extends Object

A collection of Foreign Methods for the UML API.

Method Summary
`static EClassifier` `getEClassifier(EPackage pkg, String name)` Foreign method for `EPackage.getEClassifier(String)` that accounts for possibility of underscore-escaped names.
`static EPackage` `getESubpackage(EPackage pkg, String name)` Foreign method for `EPackage.getESubpackages()` that searches by name and accounts for possibility of underscore-escaped names.
`static boolean` `isNamed(String name, ENamedElement element)` Checks whether the specified element has the given name, accounting for possibility of underscore-escaped names.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### isNamed

    public static boolean isNamed(String name,
                                  ENamedElement element)

  Checks whether the specified element has the given name, accounting for possibility of underscore-escaped names.

  Parameters:
    `name` - a possibly underscore-escaped name of an element
    `element` - a named element
  Returns:
    whether the element has this name

### getEClassifier

    public static EClassifier getEClassifier(EPackage pkg,
                                             String name)

  Foreign method for `EPackage.getEClassifier(String)` that accounts for possibility of underscore-escaped names.

  Parameters:
    `pkg` - a package
    `name` - a possibly underscore-escaped name of a nested classifier
  Returns:
    the matching classifier, or `null` if none

### getESubpackage

    public static EPackage getESubpackage(EPackage pkg,
                                          String name)

  Foreign method for `EPackage.getESubpackages()` that searches by name and accounts for possibility of underscore-escaped names.

  Parameters:
    `pkg` - a package
    `name` - a possibly underscore-escaped name of a nested package
  Returns:
    the matching sub-package, or `null` if none

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.