code: public static GraphRole[] toGRoArray(Object[] o) {
          GraphRole[] result = new GraphRole[o.length];
          System.arraycopy(o, 0, result, 0, o.length);
          return result;
      }
docs: It casts an array of objets to an array of GraphRole
  
  @param o the array of objects
  @return