code: public static void changeRotation( Rule rule, int newRotation ) {
          PointSymbolizer pointSymbolizer = StyleUtilities.pointSymbolizerFromRule(rule);
          Graphic graphic = SLD.graphic(pointSymbolizer);
          graphic.setRotation(ff.literal(newRotation));
          // Mark oldMark = SLDs.mark(pointSymbolizer);
          // oldMark.setSize(ff.literal(newRotation));
      }
docs: Changes the rotation value inside a rule.
  
  @param rule the {@link Rule}.
  @param newRotation the new rotation value in degrees.