protected void registerLayer(PdfLayer layer){
  if (layer == null)   throw new IllegalArgumentException("layer argument is null");
  layers.add(layer);
}

protected void registerLayer ( PdfLayer layer ) { if ( layer == null ) throw new IllegalArgumentException ( "layer argument is null" ) ; layers . add ( layer ) ; }
this method registers a new layer in the ocproperties .
