lookup a symbol by fully qualified name.
490748
def lookup(self, name: str):
        ''''''
        # <module>
        if name in self._moduleMap:
            return self._moduleMap[name]
        # <module>.<Symbol>
        (module_name, type_name, fragment_name) = self.split_typename(name)
        if not module_name and type_name:
            click.secho('not able to lookup symbol: {0}'.format(name), fg='red')
            return None
        module = self._moduleMap[module_name]
        return module.lookup(type_name, fragment_name)
965010
private String computeGetterName(String name)
	{
		StringBuilder _result = new StringBuilder().append(PREFIX__GETTER);
		_result.append(Character.toUpperCase(name.charAt(0))).append(name.substring(1));
		return _result.toString();
	}
524903
private static String qualifiedName(Options opt, String r) {
	if (opt.hideGenerics)
	    r = removeTemplate(r);
	// Fast path - nothing to do:
	if (opt.showQualified && (opt.showQualifiedGenerics || r.indexOf('<') < 0))
	    return r;
	StringBuilder buf = new StringBuilder(r.length());
	qualifiedNameInner(opt, r, buf, 0, !opt.showQualified);
	return buf.toString();
    }
418834
def _get_attr_like_prefix(self, sig):
        """"""
        sig_match = chpl_attr_sig_pattern.match(sig)
        if sig_match is None:
            return ChapelObject.get_signature_prefix(self, sig)

        prefixes, _, _, _ = sig_match.groups()
        if prefixes:
            return prefixes.strip() + ' '
        elif self.objtype == 'type':
            return 'type' + ' '
        else:
            return ChapelObject.get_signature_prefix(self, sig)
789535
def find_all(lookup)
      case lookup
      when ::Module
        each_node.grep(lookup)
      when ::Symbol
        each_node.find_all { |n| n.type == lookup }
      when ::String
        each_node.find_all { |n| n.source == lookup }
      when ::Regexp
        each_node.find_all { |n| n.source =~ lookup }
      else
        raise ::TypeError, "Expected class or symbol, got #{lookup.class}: #{lookup.inspect}"
      end
    end
482331
def name_check(self, original, loc, tokens):
        """"""
        internal_assert(len(tokens) == 1, "invalid name tokens", tokens)
        if self.strict:
            self.unused_imports.discard(tokens[0])
        if tokens[0] == "exec":
            return self.check_py("3", "exec function", original, loc, tokens)
        elif tokens[0].startswith(reserved_prefix):
            raise self.make_err(CoconutSyntaxError, "variable names cannot start with reserved prefix " + reserved_prefix, original, loc)
        else:
            return tokens[0]
1318616
def _lookup_unconflicted_symbol(self, symbol):
        
        try:
            uppered = symbol.upper()
        except AttributeError:
            # The mapping fails because symbol was a non-string
            return numpy.nan

        try:
            return self.finder.lookup_symbol(
                uppered,
                as_of_date=None,
                country_code=self.country_code,
            )
        except MultipleSymbolsFound:
            # Fill conflicted entries with zeros to mark that they need to be
            # resolved by date.
            return 0
        except SymbolNotFound:
            # Fill not found entries with nans.
            return numpy.nan
1367074
def _lookup_symbols(self, symbols_filename):
        """"""
        symbol_lookup = GenewaysSymbols(symbols_filename)
        for action in self.actions:
            action.up_symbol = symbol_lookup.id_to_symbol(action.up)
            action.dn_symbol = symbol_lookup.id_to_symbol(action.dn)
446764
def _search_for_export_symbols(self, matches):
        '''  '''
        pattern = '|'.join(re.escape(match) for match in matches)
        exp = re.compile(pattern)
        symbol_list = []
        try:
            for symbol in self.pefile_handle.DIRECTORY_ENTRY_EXPORT.symbols:
                if symbol.name:
                    symbol_list.append(symbol.name.lower())
            symbol_matches = []
            for symbol in symbol_list:
                if exp.search(symbol):
                    symbol_matches.append(symbol)
            return symbol_matches
        except AttributeError:
            return []
760200
def _lookup_style(element, names):
    '''
    
    '''
    return _STYLES.get('_'+element, '') + \
        ''.join([_STYLES.get(name, '') for name in names])
663781
def full_symbol(self):
        """"""
        if self._full_symbol is None:
            self._full_symbol = self._symbol_extract(cache.RE_FULL_CURSOR, brackets=True)

        return self._full_symbol
1204946
def find(self, name):
        """"""
        for i, nm in enumerate(self.data):
            if nm[-1] == name:
                return i
        return -1
720495
def qualified_name(self):
        ''''''
        return '{0}.{1}#{2}'.format(self.module.name, self.interface.name, self.name)
850033
private NameInfo getNameInfoForName(String name, SymbolType type) {
    Map<String, NameInfo> map = type == PROPERTY ? propertyNameInfo : varNameInfo;
    if (map.containsKey(name)) {
      return map.get(name);
    } else {
      NameInfo nameInfo = new NameInfo(name);
      map.put(name, nameInfo);
      symbolGraph.createNode(nameInfo);
      return nameInfo;
    }
  }
935357
def _fullname(o):
    """"""
    return o.__module__ + "." + o.__name__ if o.__module__ else o.__name__
306358
def ns(symbol):
        ''''''
        if symbol.type and symbol.type.is_primitive:
            return ''
        return '{0}::'.format('::'.join(symbol.module.name_parts))
1094583
Symbol findGlobalType(Env<AttrContext> env, Scope scope, Name name) {
        Symbol bestSoFar = typeNotFound;
        for (Scope.Entry e = scope.lookup(name); e.scope != null; e = e.next()) {
            Symbol sym = loadClass(env, e.sym.flatName());
            if (bestSoFar.kind == TYP && sym.kind == TYP &&
                bestSoFar != sym)
                return new AmbiguityError(bestSoFar, sym);
            else if (sym.kind < bestSoFar.kind)
                bestSoFar = sym;
        }
        return bestSoFar;
    }