void addFieldToClassMembers(Node classMembers,Node field){
  for (  Node n : classMembers.children()) {
    if (n.isMemberFunctionDef()) {
      classMembers.addChildBefore(field,n);
      return;
    }
  }
  classMembers.addChildToBack(field);
}

void addFieldToClassMembers ( Node classMembers , Node field ) { for ( Node n : classMembers . children ( ) ) { if ( n . isMemberFunctionDef ( ) ) { classMembers . addChildBefore ( field , n ) ; return ; } } classMembers . addChildToBack ( field ) ; }
adds a field node before the first method node in classmembers
