//
// define constraint limited what features the sld applies to
FeatureTypeConstraint constraint = sf.createFeatureTypeConstraint("Feature", Filter.INCLUDE,
null);
layer.layerFeatureConstraints().add(constraint);
//
// create a "user defined" style
Style style = sf.createStyle();
style.setName("style");