String name = sym.name.toString(); if (sym.name == Names.toString) name = "ToString"; else if (sym.name == Names.hashCode) name = "GetHashCode"; else if (sym.name == Names.equals) name = "Equals"; else if (sym.name == Name.fromString("clone")) name = "MemberwiseClone";
    public MethodBase getMethod0(Symbol sym) {	MethodBase method = (MethodBase) symbols2methods.get(sym);	if (method != null)	    return method;	MemberInfo m = ti.getMember(sym);	if (m != null && m instanceof MethodBase) {	    method = (MethodBase) m;	} else {	    // force the creation of the declaring type	    Type owner = getType(sym.owner());	    assert owner != null : Debug.show(sym);	    method = (MethodBase) symbols2methods.get(sym);	    if (method != null)		return method;	    switch (sym.info()) {	    case MethodType(Symbol[] vparams, scalac.symtab.Type result):		Type[] params = new Type[vparams.length];		for (int i = 0; i < params.length; i++)		    params[i] = getType(vparams[i]);		if (sym.isInitializer()) {		    // The owner of a constructor is the outer class		    // so get the result type of the constructor		    method = owner.GetConstructor(params);		    assert method != null : "cannot find " + owner			+ "::.ctor" + methodSignature(params);		} else {		    String name = sym.name.toString();		    if (sym.name == Names.toString) name = "ToString";		    else if (sym.name == Names.hashCode) name = "GetHashCode";		    else if (sym.name == Names.equals) name = "Equals";		    else if (sym.name == Name.fromString("clone")) name = "MemberwiseClone";		    method = owner instanceof TypeBuilder			? findMethod(sym.owner(), sym)			: owner.GetMethod(name, params);		}		break;	    default:		global.fail("Symbol doesn't have a method type: " + Debug.show(sym));	    }	    assert method != null		: Debug.show(owner) + " => Cannot find method: " + methodSignature(sym);	}	symbols2methods.put(sym, method);	return method;    }