package it.sieradzki.userscript_parser;

import it.sieradzki.userscript_parser.metadata.ExecuteRules;
import it.sieradzki.userscript_parser.metadata.GrantedApi;
import it.sieradzki.userscript_parser.metadata.RunAt;
import it.sieradzki.userscript_parser.metadata.Version;

import java.net.URL;
import java.util.Set;

/**
 * @see <a href="http://wiki.greasespot.net/Metadata_Block">Metadata Block specification</a>
 */
public class Userscript {

	public static final String OPENING_TAG = "==UserScript==";

	public static final String CLOSING_TAG = "==/UserScript==";

	private String description;

	private URL downloadUrl;

	private ExecuteRules executeRules;

	private GrantedApi grantedApi;

	private URL icon;

	private String name;

	private String namespace;

	private URL updateUrl;

	private Set<URL> require;

	private RunAt runAt;

	private Version version;

	private String code;
}

@@ -406,16 +406,93 @@
 ion%3C/a%3E%0A
+ * @see %3Ca href=%22http://wiki.greasespot.net/@grant%22%3E@grant specification%3C/a%3E%0A
  */%0Apubl
@@ -637,16 +637,33 @@
 pt==%22;%0A%0A
+%09// @description%0A
 %09private
@@ -680,24 +680,41 @@
 scription;%0A%0A
+%09// @downloadURL%0A
 %09private URL
@@ -724,24 +724,56 @@
 wnloadUrl;%0A%0A
+%09// @include + @match, @exclude%0A
 %09private Exe
@@ -797,16 +797,27 @@
 Rules;%0A%0A
+%09// @grant%0A
 %09private
@@ -841,16 +841,26 @@
 edApi;%0A%0A
+%09// @icon%0A
 %09private
@@ -867,24 +867,34 @@
  URL icon;%0A%0A
+%09// @name%0A
 %09private Str
@@ -900,24 +900,39 @@
 ring name;%0A%0A
+%09// @namespace%0A
 %09private Str
@@ -952,31 +952,19 @@
 ;%0A%0A%09
-private URL updateUrl;%0A
+// @require
 %0A%09pr
@@ -988,16 +988,28 @@
 quire;%0A%0A
+%09// @run-at%0A
 %09private
@@ -1028,33 +1028,116 @@
 ;%0A%0A%09
-private Version version;%0A
+// @updateURL%0A%09private URL updateUrl;%0A%0A%09// @version%0A%09private Version version;%0A%0A%09// Source code of userscript
 %0A%09pr

Add fields documentation