Return a function or method object appropriate to fulfill a request

        classname -- The CIM class name associated with the request.
        cname -- The function or method name to look for.
349501
def _get_callable(self, classname, cname):
        

        callable = None
        if classname in self.provregs:
            provClass = self.provregs[classname]
            if hasattr(provClass, cname):
                callable = getattr(provClass, cname)
        elif hasattr(self.provmod, cname):
            callable = getattr(self.provmod, cname)
        if callable is None:
            raise pywbem.CIMError(
                pywbem.CIM_ERR_FAILED,
                "No provider registered for %s or no callable for %s:%s on " \
                "provider %s" % (classname, classname, cname, self.provid))
        return callable
507594
def class_name(self):
    """"""
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    if not self._registry_key:
      return None

    return self._registry_key.class_name
1020382
def _get_object_class(cls, class_name):
        

        class_name = class_name.lstrip(cls.__STRING_FORMAT_UNDERSCORE)

        if class_name in cls._override_field_map:
            class_name = cls._override_field_map[class_name]

        try:
            return getattr(endpoint, class_name)
        except AttributeError:
            pass

        try:
            return getattr(object_, class_name)
        except AttributeError:
            pass

        raise BunqException(cls._ERROR_MODEL_NOT_FOUND.format(class_name))
530483
protected ClassMapping mapClass (short code, String cname)
        throws IOException, ClassNotFoundException
    {
        // create a class mapping record, and cache it
        ClassMapping cmap = createClassMapping(code, cname);
        _classmap.add(code, cmap);
        return cmap;
    }
1005984
public String getMethodNameFromDD(List<LifecycleCallback> callbacks, String classname) {
        String methodName = null;
        for (LifecycleCallback callback : callbacks) {
            // lifecycle-callback-class default to the enclosing component class Client
            String callbackClassName;
            callbackClassName = callback.getClassName();
            if (callbackClassName == null) {
                callbackClassName = mainClassName;
            }
            if (callbackClassName.equals(classname)) {
                if (methodName == null) {
                    methodName = callback.getMethodName();
                } else {
                    Tr.warning(tc, "DUPLICATE_CALLBACK_METHOD_CWWKC2454W", new Object[] { methodName, classname });
                }
            }
        }
        return methodName;
    }
1333336
def system_methodHelp(self, method_name: str)->str:
        
        method = None
        if method_name in self.funcs:
            method = self.funcs[method_name]
        elif self.instance is not None:
            try:
                method = resolve_dotted_attribute(
                    self.instance,
                    method_name,
                    self.allow_dotted_names
                )
            except AttributeError:
                pass
        if method is None:
            return ""
        else:
            return pydoc.getdoc(method)
304234
def _iparam_objectname(objectname, arg_name):
        

        if isinstance(objectname, (CIMClassName, CIMInstanceName)):
            objectname = objectname.copy()
            objectname.host = None
            objectname.namespace = None
        elif isinstance(objectname, six.string_types):
            objectname = CIMClassName(objectname)
        elif objectname is None:
            pass
        else:
            raise TypeError(
                _format("The {0!A} argument of the WBEMConnection operation "
                        "has invalid type {1} (must be None, a string, a "
                        "CIMClassName, or a CIMInstanceName)",
                        arg_name, type(objectname)))
        return objectname
1329428
def qualified_class_name(o):
    """"""
    module = o.__class__.__module__
    if module is None or module == str.__class__.__module__:
        return o.__class__.__name__
    return module + '.' + o.__class__.__name__
171492
def get_class_that_defined_method(fun):
    
    if inspect.ismethod(fun):
        for cls in inspect.getmro(fun.__self__.__class__):
            if cls.__dict__.get(fun.__name__) is fun:
                return cls
        fun = fun.__func__  # fallback to __qualname__ parsing
    if inspect.isfunction(fun):
        cls = getattr(inspect.getmodule(fun),
                      fun.__qualname__.split('.<locals>', 1)[0].rsplit('.', 1)[0], None)
        if isinstance(cls, type):
            return cls
    return getattr(fun, '__objclass__', None)
281151
def get_method(self, cls_name):
        
        for id, spec in self.db.items():
            if spec["method"].__class__.__name__ == cls_name:
                yield spec["method"]
12082
def function(fname):
    
    def _f(func):
        class WrapFunction(Function):
            name = fname

            def __call__(self, *args, **kwargs):
                return func(*args, **kwargs)

        return WrapFunction

    return _f
1299203
def MethodName(self, name, separator='_'):
        """"""
        if name is None:
            return None
        name = Names.__ToCamel(name, separator=separator)
        return Names.CleanName(name)
225082
def nice_classname(obj):
    
    if inspect.isclass(obj):
        cls_name = obj.__name__
    else:
        cls_name = obj.__class__.__name__
    mod = inspect.getmodule(obj)
    if mod:
        name = mod.__name__
        # jython
        if name.startswith('org.python.core.'):
            name = name[len('org.python.core.'):]
        return "%s.%s" % (name, cls_name)
    else:
        return cls_name
296187
def get_methods_class(self, class_name):
        
        l = []
        for i in self.classes.class_def:
            for j in i.get_methods():
                if class_name == j.get_class_name():
                    l.append(j)

        return l
1259850
public static Method findMethod(Class<?> c, String methodName) {
        for (Method m : c.getMethods()) {
            if (!m.getName().equalsIgnoreCase(methodName)) {
                continue;
            }
            if (m.getParameterCount() != 1) {
                continue;
            }
            return m;
        }

        return null;
    }
764356
function(name) {
    var cls = new Class(name,{
      inherits: Error,
      constructor: function(message) {
        this.name = name;
        this.message = message;
      },
    });
    return cls.toFunction();
  }
1315669
def get_class_method(cls_or_inst, method_name):
    
    cls = cls_or_inst if isinstance(cls_or_inst, type) else cls_or_inst.__class__
    meth = getattr(cls, method_name, None)
    if isinstance(meth, property):
        meth = meth.fget
    elif isinstance(meth, cached_property):
        meth = meth.func
    return meth