double minScale = 0;
double maxScale = Double.MAX_VALUE;
layer = ilayer.getResource(org.geotools.data.ows.Layer.class, null);
// check if there are min/max scale rules
StyleBlackboard sb = (StyleBlackboard) ilayer.getStyleBlackboard();
Style style = (Style) sb.lookup(Style.class);
if (style != null) {
Rule rule = style.getFeatureTypeStyles()[0].getRules()[0];
minScale = rule.getMinScaleDenominator();
maxScale = rule.getMaxScaleDenominator();
}