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

Method paramName

bind/genjava.go:800–806  ·  view source on GitHub ↗
(params *types.Tuple, pos int)

Source from the content-addressed store, hash-verified

798var javaLetterDigitRE = regexp.MustCompile(`[0-9a-zA-Z$_]`)
799
800func (g *JavaGen) paramName(params *types.Tuple, pos int) string {
801 name := basicParamName(params, pos)
802 if !javaLetterDigitRE.MatchString(name) {
803 name = fmt.Sprintf("p%d", pos)
804 }
805 return javaNameReplacer(name)
806}
807
808func (g *JavaGen) genFuncSignature(o *types.Func, jm *java.Func, hasThis bool) {
809 sig := o.Type().(*types.Signature)

Callers 6

genConstructorMethod · 0.95
genFuncArgsMethod · 0.95
genJNIFuncSignatureMethod · 0.95
genJNIConstructorMethod · 0.95
genJNIFuncBodyMethod · 0.95

Calls 1

basicParamNameFunction · 0.85

Tested by

no test coverage detected