StyleFactory sfact = CommonFactoryFinder.getStyleFactory();
FilterFactory ffact = CommonFactoryFinder.getFilterFactory();
Mark m = sfact.mark(
ffact.literal("square"),
sfact.fill(null, ffact.literal("#0000FF"), null),
sfact.stroke(ffact.literal("#000000"), null, ffact.literal(1), null, null, null, null));
Graphic g = sfact.graphic(Arrays.asList((GraphicalSymbol)m), Expression.NIL, Expression.NIL, ffact.literal(45.0), null, null);
Symbolizer symb = sfact.pointSymbolizer(null, ffact.property(null), null, null, g);
Rule r = sfact.rule(null, null, null, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY, Arrays.asList(symb), null);