private static Map<String,Boolean> objectMethodsToGenerate(List<ExecutableElement> methods){
  Map<String,Boolean> vars=new TreeMap<String,Boolean>();
  vars.put("equals",false);
  vars.put("hashCode",false);
  vars.put("toString",false);
  for (  ExecutableElement method : methods) {
    if (isToStringOrEqualsOrHashCode(method)) {
      boolean canGenerate=method.getModifiers().contains(Modifier.ABSTRACT) || isJavaLangObject((TypeElement)method.getEnclosingElement());
      vars.put(method.getSimpleName().toString(),canGenerate);
    }
  }
  assert vars.size() == 3;
  return vars;
}

private static Map < String , Boolean > objectMethodsToGenerate ( List < ExecutableElement > methods ) { Map < String , Boolean > vars = new TreeMap < String , Boolean > ( ) ; vars . put ( "equals" , false ) ; vars . put ( "hashCode" , false ) ; vars . put ( "toString" , false ) ; for ( ExecutableElement method : methods ) { if ( isToStringOrEqualsOrHashCode ( method ) ) { boolean canGenerate = method . getModifiers ( ) . contains ( Modifier . ABSTRACT ) || isJavaLangObject ( ( TypeElement ) method . getEnclosingElement ( ) ) ; vars . put ( method . getSimpleName ( ) . toString ( ) , canGenerate ) ; } } assert vars . size ( ) == 3 ; return vars ; }
given a list of all methods defined in or inherited by a class , returns a map with keys " tostring " , " equals " , " hashcode " and corresponding value true if that method should be generated .
