code: private ShapeStyle createStyleForFeature(Feature feature) {
  		ShapeStyle style = null;
  		if (null != feature) {
  			FeatureStyleInfo styleInfo = null;
  			if (feature.getStyleId() != null) {
  				String check = feature.getStyleId();
  				if (null != check) {
  					for (FeatureStyleInfo fsi :
  							feature.getLayer().getLayerInfo().getNamedStyleInfo().getFeatureStyles()) {
  						if (check.equals(fsi.getStyleId())) {
  							styleInfo = fsi;
  							break;
  						}
  					}
  				}
  			}
  			style = new ShapeStyle(styleInfo);
  	
  			Geometry geometry = feature.getGeometry();
  			if (null != geometry) {
  				switch (geometry.getLayerType()) {
  					case LINESTRING:
  					case MULTILINESTRING:
  						style.merge(lineSelectStyle);
  						break;
  					case POLYGON:
  					case MULTIPOLYGON:
  						style.merge(polygonSelectStyle);
  						break;
  					case POINT:
  					case MULTIPOINT:
  						style.merge(pointSelectStyle);
  						break;
  					default:
  						throw new IllegalStateException("Cannot create style for feature with Geometry type " +
  								geometry.getLayerType());
  				}
  			}
  		}
  		return style;
  	}
docs: Private methods: