Build a summary list of all the methods in this context
369
def build_method_summary_list(path_prefix="")
      collect_methods unless @methods
      meths = @methods.sort
      res = []
      meths.each do |meth|
	res << {
          "name" => CGI.escapeHTML(meth.name),
          "aref" => "#{path_prefix}\##{meth.aref}" 
        }
      end
      res
    end
246209
private static Map<String, Method> gatherAllDeclaredMethods(Class clazz) {
        Map<String, Method> methods = new HashMap<String, Method>();
        gatherAllDeclaredMethods(methods, clazz);
        return methods;
    }
295278
static function listMethods( )
    {
        $methods = array();
        $ini = eZINI::Instance( 'ezjscore.ini' );
        foreach( $ini->groups() as $blockname => $data )
        {
            if ( strpos( $blockname, 'ezjscServer_' ) === 0 )
            {
                $classname = substr( $blockname, 12 );

                // replicate same logic as ezjscore
                if ( $ini->hasVariable( $blockname, 'TemplateFunction' ) )
                {
                    // unluckily any function name is accepted here
                    $methods[] = "$classname::*";
                }
                else
                {
                    // load file if defined, else use autoload (same as ezjsc does)
                    if ( $ini->hasVariable( $blockname, 'File' ) )
                        include_once( $ini->variable( $blockname, 'File' ) );
                    // get class name if defined, else use first argument as class name
                    if ( $ini->hasVariable( $blockname, 'Class' ) )
                        $realclassname = $ini->variable( $blockname, 'Class' );
                    else
                        $realclassname = $classname;

                    if ( class_exists( $realclassname ) )
                    {
                        $reflectionClass = new ReflectionClass( $realclassname );
                        foreach( $reflectionClass->getMethods() as $reflectionMethod )
                        {
                            if ( $reflectionMethod->isStatic() )
                            {
                                $methods[] = "$classname::" . $reflectionMethod->name;
                            }
                        }
                    }
                    else
                    {
                        /// @todo log config error
                    }
                }
            }
        }
        return $methods;
    }
42092
def make_summary_funcs(rows, ids):
    """"""
    return {
        'len': len,
        'list': lambda *x: filter(None, list(x)),
        'max': max,
        'min': min,
        'rows': partial(summary_rows, rows, ids),
        'sum': sum,
        'trace': print_trace
    }
890657
public function getMethodMutations($method_id, Context $this_context, bool $from_project_analyzer = false)
    {
        list($fq_class_name, $method_name) = explode('::', $method_id);

        if (isset($this->class_analyzers_to_analyze[strtolower($fq_class_name)])) {
            $class_analyzer_to_examine = $this->class_analyzers_to_analyze[strtolower($fq_class_name)];
        } else {
            if (!$from_project_analyzer) {
                $this->project_analyzer->getMethodMutations(
                    $method_id,
                    $this_context,
                    $this->getRootFilePath(),
                    $this->getRootFileName()
                );
            }

            return;
        }

        $call_context = new Context($this_context->self);
        $call_context->collect_mutations = $this_context->collect_mutations;
        $call_context->collect_initializations = $this_context->collect_initializations;
        $call_context->initialized_methods = $this_context->initialized_methods;
        $call_context->include_location = $this_context->include_location;

        foreach ($this_context->vars_possibly_in_scope as $var => $_) {
            if (strpos($var, '$this->') === 0) {
                $call_context->vars_possibly_in_scope[$var] = true;
            }
        }

        foreach ($this_context->vars_in_scope as $var => $type) {
            if (strpos($var, '$this->') === 0) {
                $call_context->vars_in_scope[$var] = $type;
            }
        }

        $call_context->vars_in_scope['$this'] = $this_context->vars_in_scope['$this'];

        $class_analyzer_to_examine->getMethodMutations($method_name, $call_context);

        foreach ($call_context->vars_possibly_in_scope as $var => $_) {
            $this_context->vars_possibly_in_scope[$var] = true;
        }

        foreach ($call_context->vars_in_scope as $var => $type) {
            $this_context->vars_in_scope[$var] = $type;
        }
    }
227308
def make_method_names(self):
        """"""
        lst = []
        for group in self.all_groups:
            for single in group.singles:
                name, english = single.name, single.english
                if english[1:-1] != name.replace('_', ' '):
                    lst.extend(self.tokens.make_name_modifier(not group.root, single.identifier, english))
        return lst
1267850
function buildMethodMap(methods) {
  // Makes a fake set of initial methods
  var methodMap = {};
  methods.forEach(function(method) {
    methodMap[method.name] = getMethod(method.name);
  });
  return methodMap;
}
478656
def _all_help_methods(self):
        
        methods = {name:method for name, method in inspect.getmembers(self, predicate=inspect.isroutine) if not name.startswith('_')}
        return methods
122225
def build_constants_summary_list(section)
      @context.constants.map do |co|
        next unless co.section == section

        res = {
          'name'  => co.name,
          'value' => CGI.escapeHTML(co.value)
        }

        if co.comment and not co.comment.empty? then
          res['desc'] = markup co.comment, true
        end

        res
      end.compact
    end
628973
def get_all_methods
      methods = []
      each_type do | type |
        type.each_method do |meth|
          methods << meth
        end
      end
      methods
    end
887724
def get_method_names(obj):
        
        method_names = []
        
        for method_name in dir(obj):

            method = getattr(obj, method_name)

            if MethodReflector._is_method(method, method_name):
                method_names.append(method_name)

        return method_names
367448
def dump(self):
        
        return [
            {
                'context_name': context.name,
                'via': getattr(self._via_by_context.get(context),
                               'name', None),
                'refs': self._refs_by_context.get(context),
            }
            for context, key in sorted(self._key_by_context.items(),
                                       key=lambda c_k: c_k[0].context_id)
        ]
834428
def to_help(self):
        
        result = []
        result.append(self.classname)
        result.append("=" * len(self.classname))
        result.append("")
        result.append("DESCRIPTION")
        result.append("")
        result.append(self.global_info())
        result.append("")
        result.append("OPTIONS")
        result.append("")
        options = javabridge.call(self.jobject, "listOptions", "()Ljava/util/Enumeration;")
        enum = javabridge.get_enumeration_wrapper(options)
        while enum.hasMoreElements():
            opt = Option(enum.nextElement())
            result.append(opt.synopsis)
            result.append(opt.description)
            result.append("")
        return '\n'.join(result)
708798
def list_public_methods(obj: Any):
    
    return [member for member in dir(obj)
            if not member.startswith('_') and
            callable(getattr(obj, member))]
869626
def build_method_detail_list(section)
      outer = []

      methods = @methods.sort
      for singleton in [true, false]
        for vis in [ :public, :protected, :private ] 
          res = []
          methods.each do |m|
            if m.section == section and
                m.document_self and 
                m.visibility == vis and 
                m.singleton == singleton
              row = {}
              if m.call_seq
                row["callseq"] = m.call_seq.gsub(/->/, '&rarr;')
              else
                row["name"]        = CGI.escapeHTML(m.name)
                row["params"]      = m.params
              end
              desc = m.description.strip
              row["m_desc"]      = desc unless desc.empty?
              row["aref"]        = m.aref
              row["visibility"]  = m.visibility.to_s

              alias_names = []
              m.aliases.each do |other|
                if other.viewer   # won't be if the alias is private
                  alias_names << {
                    'name' => other.name,
                    'aref'  => other.viewer.as_href(path)
                  } 
                end
              end
              unless alias_names.empty?
                row["aka"] = alias_names
              end

              if @options.inline_source
                code = m.source_code
                row["sourcecode"] = code if code
              else
                code = m.src_url
                if code
                  row["codeurl"] = code
                  row["imgurl"]  = m.img_url
                end
              end
              res << row
            end
          end
          if res.size > 0 
            outer << {
              "type"    => vis.to_s.capitalize,
              "category"    => singleton ? "Class" : "Instance",
              "methods" => res
            }
          end
        end
      end
      outer
    end
1191024
def EXT method_name, *description, **metadata, &body
  INSTANCE_METHOD \
    method_name, 
    *description,
    **metadata \
  do
    subject do
      
    end
  end
end
1340644
def list_actions(cls):
        """"""
        # Make sure these are always at the beginning of the list
        actions = ['start', 'stop', 'restart', 'status']
        # Iterate over the instance attributes checking for actions that
        # have been exposed
        for func_name in dir(cls):
            func = getattr(cls, func_name)
            if (not hasattr(func, '__call__') or
                    not getattr(func, '__daemonocle_exposed__', False)):
                # Not a function or not exposed
                continue
            action = func_name.replace('_', '-')
            if action not in actions:
                actions.append(action)

        return actions