GrMethod (GrTypeDefinition aClass, GrTraitMethod method, PsiSubstitutor substitutor) { final Project project = aClass.getProject(); final GrMethod result = (GrMethod)GenerateMembersUtil.substituteGenericMethod(method, substitutor, aClass); setupModifierList(result); setupTraitMethodBody(project, result, method); setupReturnType(result, method); setupAnnotations(aClass, method, result); GroovyChangeContextUtil.encodeContextInfo(result); return result; }