Parse a LOCALCLASSPATH element and return the class path it represents
        as a CIMClassName object.

          ::

            <!ELEMENT LOCALCLASSPATH (LOCALNAMESPACEPATH, CLASSNAME)>
434178
def parse_localclasspath(self, tup_tree):
        

        self.check_node(tup_tree, 'LOCALCLASSPATH')

        k = kids(tup_tree)

        if len(k) != 2:
            raise CIMXMLParseError(
                _format("Element {0!A} has invalid number of child elements "
                        "{1!A} (expecting two child elements "
                        "(LOCALNAMESPACEPATH, CLASSNAME))", name(tup_tree), k),
                conn_id=self.conn_id)

        namespace = self.parse_localnamespacepath(k[0])
        class_path = self.parse_classname(k[1])
        class_path.namespace = namespace

        return class_path
300261
static String getClassPathName(Class<?> c) {
		String strClassFullName = c.getName();

		StringTokenizer st = new StringTokenizer(strClassFullName, ".");
		StringBuffer sb = new StringBuffer();
		sb.append(st.nextToken());

		while (st.hasMoreTokens()) {
			sb.append("/");
			sb.append(st.nextToken());
		}

		sb.append(".class");
		return sb.toString();
	}
215038
def get_element_by_path(tree, path_and_name, namespace):
    # type: (_Element, str, str) -> typing.Union[_Element, None]
    """"""
    global xml_element_cache
    namespace_map = {'A': namespace[1:-1]}
    base_path, element_name = path_and_name.rsplit('/', 1)
    if base_path in xml_element_cache:
        base_element = xml_element_cache[base_path]
    else:
        base_xpath = ar_path_to_x_path(base_path)
        elems = tree.xpath(base_xpath, namespaces=namespace_map)
        base_element = elems[0] if elems else None
        xml_element_cache[base_path] = base_element

    element_found = None
    if base_element is not None:
        element_found = base_element.xpath(
            ".//A:SHORT-NAME[text()='{name}']/..".format(name=element_name),
            namespaces=namespace_map)[0]
    return element_found
442698
def for_name(modpath, classname):
    '''
    
    '''
    module = __import__(modpath, fromlist=[classname])
    classobj = getattr(module, classname)
    return classobj()
819852
def _get_elements_property(parent_to_parse, element_path, prop_name):
    

    parent_element = get_element(parent_to_parse)

    if parent_element is None:
        return []

    if element_path and not element_exists(parent_element, element_path):
        return []

    if not element_path:
        texts = getattr(parent_element, prop_name)
        texts = texts.strip() if isinstance(texts, string_types) else texts
        texts = [texts] if texts else []
    else:
        texts = [t for t in (
            prop.strip() if isinstance(prop, string_types) else prop
            for prop in (getattr(node, prop_name) for node in parent_element.findall(element_path)) if prop
        ) if t]

    return texts
1257011
def _parseSimpleSelector(self, src):
        
        ctxsrc = src.lstrip()
        nsPrefix, src = self._getMatchResult(self.re_namespace_selector, src)
        name, src = self._getMatchResult(self.re_element_name, src)
        if name:
            pass # already *successfully* assigned
        elif src[:1] in self.SelectorQualifiers:
            name = '*'
        else:
            raise self.ParseError('Selector name or qualifier expected', src, ctxsrc)

        name = self.cssBuilder.resolveNamespacePrefix(nsPrefix, name)
        selector = self.cssBuilder.selector(name)
        while src and src[:1] in self.SelectorQualifiers:
            hash_, src = self._getMatchResult(self.re_hash, src)
            if hash_ is not None:
                selector.addHashId(hash_)
                continue

            class_, src = self._getMatchResult(self.re_class, src)
            if class_ is not None:
                selector.addClass(class_)
                continue

            if src.startswith('['):
                src, selector = self._parseSelectorAttribute(src, selector)
            elif src.startswith(':'):
                src, selector = self._parseSelectorPseudo(src, selector)
            else:
                break

        return src.lstrip(), selector
159506
def get_class(class_string):
    
    split_string = class_string.encode('ascii').split('.')
    import_path = '.'.join(split_string[:-1])
    class_name = split_string[-1]

    if class_name:
        try:
            if import_path:
                mod = __import__(import_path, globals(), {}, [class_name])
                cls = getattr(mod, class_name)
            else:
                cls = __import__(class_name, globals(), {})
            if cls:
                return cls
        except (ImportError, AttributeError):
            pass

    return None
714074
def find_ele_by_predicate(class_name: '*', value:)
      elements = find_eles_by_predicate(class_name: class_name, value: value)
      raise _no_such_element if elements.empty?

      elements.first
    end
963041
public static String classfilePathToClassName(final String classfilePath) {
        if (!classfilePath.endsWith(".class")) {
            throw new IllegalArgumentException("Classfile path does not end with \".class\": " + classfilePath);
        }
        return classfilePath.substring(0, classfilePath.length() - 6).replace('/', '.');
    }
844748
def parse_objectpath(self, tup_tree):
        

        self.check_node(tup_tree, 'OBJECTPATH')

        child = self.one_child(tup_tree, ('INSTANCEPATH', 'CLASSPATH'))

        return (name(tup_tree), attrs(tup_tree), child)
745107
def each_instance( namespace_or_objectpath, classname = nil )
    op = if namespace_or_objectpath.is_a? Sfcc::Cim::ObjectPath
      namespace_or_objectpath
    else
      objectpath namespace_or_objectpath, classname
    end
    begin
      @client.instances(op).each do |inst|
        yield inst
      end
    rescue Sfcc::Cim::ErrorInvalidClass, Sfcc::Cim::ErrorInvalidNamespace
    end
  end
1099412
private void processClassPath() {
    URL[] classLoaderUrls =
        ((URLClassLoader) Thread.currentThread().getContextClassLoader()).getURLs();
    for (URL url : classLoaderUrls) {
      String path = url.getFile();
      if (path.matches(config.getJarInferRegexStripModelJarName())) {
        String name = path.replaceAll(config.getJarInferRegexStripModelJarName(), "$1");
        LOG(DEBUG, "DEBUG", "model jar name: " + name + "\tjar path: " + path);
        if (!mapModelJarLocations.containsKey(name))
          mapModelJarLocations.put(name, new LinkedHashSet<>());
        mapModelJarLocations.get(name).add(path);
      }
    }
  }
993513
def load_class(location):
    
    mod_name, cls_name = location = location.strip().split(':')
    tokens = mod_name.split('.')

    fromlist = '[]'
    if len(tokens) > 1:
        fromlist = '.'.join(tokens[:-1])

    module = __import__(mod_name, fromlist=fromlist)

    try:
        return getattr(module, cls_name)
    except AttributeError:
        raise ImportError("%r not found in %r" % (cls_name, mod_name))
679305
def parse_class_names(class_names):
    
    if len(class_names) > 0:
        if os.path.isfile(class_names):
            # try to open it to read class names
            with open(class_names, 'r') as f:
                class_names = [l.strip() for l in f.readlines()]
        else:
            class_names = [c.strip() for c in class_names.split(',')]
        for name in class_names:
            assert len(name) > 0
    else:
        raise RuntimeError("No valid class_name provided...")
    return class_names
624108
private Class<? extends Constraint> getClassObject(final Element element) throws ClassNotFoundException {
		String className = element.getAttributeValue(XMLTags.CLASS);
		className = className.indexOf('.') > 0 ? className : getClass().getPackage().getName() + '.' + className;
		return Class.forName(className).asSubclass(Constraint.class);

	}
318248
def import_namespaced_class(path):
    
    parts = path.split('.')
    return getattr(importlib.import_module('.'.join(parts[0:-1])), parts[-1])
1030349
def find_ele_by_predicate_include(class_name: '*', value:)
      elements = find_eles_by_predicate_include(class_name: class_name, value: value)
      raise _no_such_element if elements.empty?

      elements.first
    end