code: public static Geometry sunPosition(Geometry point, Date date) throws IllegalArgumentException{
          if(point == null){
              return null;
          }
          if (point instanceof Point) {
              Coordinate coord = point.getCoordinate();
              return point.getFactory().createPoint( SunCalc.getPosition(date, coord.y, coord.x));
          } else {
              throw new IllegalArgumentException("The sun position is computed according a point location.");
          }
      }
docs: Return the sun position for a given date
  
  @param point
  @param date
  @return
  @throws IllegalArgumentException