MCPcopy Create free account
hub / github.com/golang/mobile / filterReferences

Method filterReferences

internal/importers/java/java.go:577–594  ·  view source on GitHub ↗
(classes []*Class, refs *importers.References, funcRefs map[funcRef]struct{})

Source from the content-addressed store, hash-verified

575}
576
577func (j *Importer) filterReferences(classes []*Class, refs *importers.References, funcRefs map[funcRef]struct{}) {
578 for _, cls := range classes {
579 var filtered []*FuncSet
580 for _, f := range cls.Funcs {
581 if _, exists := funcRefs[funcRef{cls.Name, f.GoName}]; exists {
582 filtered = append(filtered, f)
583 }
584 }
585 cls.Funcs = filtered
586 filtered = nil
587 for _, m := range cls.Methods {
588 if _, exists := refs.Names[m.GoName]; exists {
589 filtered = append(filtered, m)
590 }
591 }
592 cls.Methods = filtered
593 }
594}
595
596// importClasses imports the named classes from the classpaths of the Importer.
597func (j *Importer) importClasses(names []string, allowMissingClasses bool) ([]*Class, error) {

Callers 1

ImportMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected