More jdoc stuff

This commit is contained in:
boy0001 2015-03-13 18:26:08 +11:00
parent 1fedb1e347
commit 61a225937d
15 changed files with 27 additions and 130 deletions

View File

@ -43,6 +43,7 @@
<configuration> <configuration>
<show>public</show> <show>public</show>
<useStandardDocletOptions>false</useStandardDocletOptions> <useStandardDocletOptions>false</useStandardDocletOptions>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>

View File

@ -28,6 +28,8 @@ public class ListTagBuilder {
/** /**
* Create a new builder instance. * Create a new builder instance.
* *
* @param type
*
* @return a new builder * @return a new builder
*/ */
public static ListTagBuilder create(final Class<? extends Tag> type) { public static ListTagBuilder create(final Class<? extends Tag> type) {
@ -37,6 +39,9 @@ public class ListTagBuilder {
/** /**
* Create a new builder instance. * Create a new builder instance.
* *
* @param entries
* @param <T>
*
* @return a new builder * @return a new builder
*/ */
@SafeVarargs @SafeVarargs

View File

@ -11,8 +11,8 @@ import java.util.Map;
/** /**
* This class reads <strong>NBT</strong>, or <strong>Named Binary Tag</strong> streams, and produces an object graph of * This class reads <strong>NBT</strong>, or <strong>Named Binary Tag</strong> streams, and produces an object graph of
* subclasses of the {@code Tag} object. <p> The NBT format was created by Markus Persson, and the specification * subclasses of the {@code Tag} object. The NBT format was created by Markus Persson, and the specification
* may be found at <a href="http://www.minecraft.net/docs/NBT.txt"> http://www.minecraft.net/docs/NBT.txt</a>. </p> * may be found at @linktourl http://www.minecraft.net/docs/NBT.txt"> http://www.minecraft.net/docs/NBT.txt.
*/ */
public final class NBTInputStream implements Closeable { public final class NBTInputStream implements Closeable {
private final DataInputStream is; private final DataInputStream is;

View File

@ -29,7 +29,8 @@ import java.util.List;
/** /**
* <p> This class writes <strong>NBT</strong>, or <strong>Named Binary Tag</strong> <code>Tag</code> objects to an * <p> This class writes <strong>NBT</strong>, or <strong>Named Binary Tag</strong> <code>Tag</code> objects to an
* underlying <code>OutputStream</code>. </p> <p> The NBT format was created by Markus Persson, and the * underlying <code>OutputStream</code>. </p> <p> The NBT format was created by Markus Persson, and the
* specification may be found at <a href="http://www.minecraft.net/docs/NBT.txt"> http://www.minecraft.net/docs/NBT.txt</a>. * specification may be found at
* @linktourl http://www.minecraft.net/docs/NBT.txt
* </p> * </p>
* *
* @author Graham Edgecombe * @author Graham Edgecombe

View File

@ -134,6 +134,7 @@ public final class NBTUtils {
* @param items the map to read from * @param items the map to read from
* @param key the key to look for * @param key the key to look for
* @param expected the expected NBT class type * @param expected the expected NBT class type
* @param <T>
* *
* @return child tag * @return child tag
*/ */

View File

@ -34,59 +34,6 @@ public class HTTP {
*/ */
public static final String CRLF = "\r\n"; public static final String CRLF = "\r\n";
/**
* Convert an HTTP header string into a JSONObject. It can be a request header or a response header. A request
* header will contain
*
*
* <pre>
* {
* Method: "POST" (for example),
* "Request-URI": "/" (for example),
* "HTTP-Version": "HTTP/1.1" (for example)
* }
* </pre>
*
* A response header will contain
*
*
* <pre>
* {
* "HTTP-Version": "HTTP/1.1" (for example),
* "Status-Code": "200" (for example),
* "Reason-Phrase": "OK" (for example)
* }
* </pre>
*
* In addition, the other parameters in the header will be captured, using the HTTP field names as JSON names, so
* that
*
*
* <pre>
* Date: Sun, 26 May 2002 18:06:04 GMT
* Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
* Cache-Control: no-cache
* </pre>
*
* become
*
*
* <pre>
* {...
* Date: "Sun, 26 May 2002 18:06:04 GMT",
* Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
* "Cache-Control": "no-cache",
* ...}
* </pre>
*
* It does no further checking or conversion. It does not parse dates. It does not do '%' transforms on URLs.
*
* @param string An HTTP header string.
*
* @return A JSONObject containing the elements and attributes of the XML string.
*
* @throws JSONException
*/
public static JSONObject toJSONObject(final String string) throws JSONException { public static JSONObject toJSONObject(final String string) throws JSONException {
final JSONObject jo = new JSONObject(); final JSONObject jo = new JSONObject();
final HTTPTokener x = new HTTPTokener(string); final HTTPTokener x = new HTTPTokener(string);

View File

@ -188,7 +188,6 @@ public class JSONML {
* Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform. Each * Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform. Each
* XML tag is represented as a JSONArray in which the first element is the tag name. If the tag has attributes, then * XML tag is represented as a JSONArray in which the first element is the tag name. If the tag has attributes, then
* the second element will be JSONObject containing the name/value pairs. If the tag contains children, then strings * the second element will be JSONObject containing the name/value pairs. If the tag contains children, then strings
* and JSONArrays will represent the child tags. Comments, prologs, DTDs, and <code>&lt;[ [ ]]></code> are ignored.
* *
* @param string The source string. * @param string The source string.
* *

View File

@ -343,7 +343,6 @@ public class JSONObject {
/** /**
* Produce a string in double quotes with backslash sequences in all the right places. A backslash will be inserted * Produce a string in double quotes with backslash sequences in all the right places. A backslash will be inserted
* within </, producing <\/, allowing JSON text to be delivered in HTML. In JSON text, a string cannot contain a
* control character or an unescaped quote or backslash. * control character or an unescaped quote or backslash.
* *
* @param string A String * @param string A String

View File

@ -9,58 +9,16 @@ import java.util.Iterator;
* @version 2014-05-03 * @version 2014-05-03
*/ */
public class XML { public class XML {
/**
* The Character '&amp;'.
*/
public static final Character AMP = '&'; public static final Character AMP = '&';
/**
* The Character '''.
*/
public static final Character APOS = '\''; public static final Character APOS = '\'';
/**
* The Character '!'.
*/
public static final Character BANG = '!'; public static final Character BANG = '!';
/**
* The Character '='.
*/
public static final Character EQ = '='; public static final Character EQ = '=';
/**
* The Character '>'.
*/
public static final Character GT = '>'; public static final Character GT = '>';
/**
* The Character '&lt;'.
*/
public static final Character LT = '<'; public static final Character LT = '<';
/**
* The Character '?'.
*/
public static final Character QUEST = '?'; public static final Character QUEST = '?';
/**
* The Character '"'.
*/
public static final Character QUOT = '"'; public static final Character QUOT = '"';
/**
* The Character '/'.
*/
public static final Character SLASH = '/'; public static final Character SLASH = '/';
/**
* Replace special characters with XML escapes:
*
*
* <pre>
* &amp; <small>(ampersand)</small> is replaced by &amp;amp;
* &lt; <small>(less than)</small> is replaced by &amp;lt;
* &gt; <small>(greater than)</small> is replaced by &amp;gt;
* &quot; <small>(double quote)</small> is replaced by &amp;quot;
* </pre>
*
* @param string The string to be escaped.
*
* @return The escaped string.
*/
public static String escape(final String string) { public static String escape(final String string) {
final StringBuilder sb = new StringBuilder(string.length()); final StringBuilder sb = new StringBuilder(string.length());
for (int i = 0, length = string.length(); i < length; i++) { for (int i = 0, length = string.length(); i < length; i++) {
@ -300,20 +258,6 @@ public class XML {
return string; return string;
} }
/**
* Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in
* this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes,
* and content text, while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not
* does not like to distinguish between elements and attributes. Sequences of similar elements are represented as
* JSONArrays. Content text may be placed in a "content" member. Comments, prologs, DTDs, and <code>&lt;[ [
* ]]></code> are ignored.
*
* @param string The source string.
*
* @return A JSONObject containing the structured data from the XML string.
*
* @throws JSONException
*/
public static JSONObject toJSONObject(final String string) throws JSONException { public static JSONObject toJSONObject(final String string) throws JSONException {
final JSONObject jo = new JSONObject(); final JSONObject jo = new JSONObject();
final XMLTokener x = new XMLTokener(string); final XMLTokener x = new XMLTokener(string);

View File

@ -55,10 +55,10 @@ public class XMLTokener extends JSONTokener {
} }
/** /**
* Get the next XML outer token, trimming whitespace. There are two kinds of tokens: the '<' character which begins * Get the next XML outer token, trimming whitespace. There are two kinds of tokens: the '&lt;' character which begins
* a markup tag, and the content text between markup tags. * a markup tag, and the content text between markup tags.
* *
* @return A string, or a '<' Character, or null if there is no more source text. * @return A string, or a '&lt;' Character, or null if there is no more source text.
* *
* @throws JSONException * @throws JSONException
*/ */
@ -90,7 +90,7 @@ public class XMLTokener extends JSONTokener {
} }
/** /**
* Return the next entity. These entities are translated to Characters: <code>&amp; &apos; &gt; &lt; * Return the next entity. These entities are translated to Characters: <code>&amp; &quot; &gt; &lt;
* &quot;</code>. * &quot;</code>.
* *
* @param ampersand An ampersand character. * @param ampersand An ampersand character.
@ -119,7 +119,7 @@ public class XMLTokener extends JSONTokener {
/** /**
* Returns the next XML meta token. This is used for skipping over <!...> and <?...?> structures. * Returns the next XML meta token. This is used for skipping over <!...> and <?...?> structures.
* *
* @return Syntax characters (<code>< > / = ! ?</code>) are returned as Character, and strings and names are * @return Syntax characters (<code>&lt; &gt; / = ! ?</code>) are returned as Character, and strings and names are
* returned as Boolean. We don't care what the values actually are. * returned as Boolean. We don't care what the values actually are.
* *
* @throws JSONException If a string is not properly closed or if the XML is badly structured. * @throws JSONException If a string is not properly closed or if the XML is badly structured.
@ -182,7 +182,7 @@ public class XMLTokener extends JSONTokener {
/** /**
* Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters: * Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters:
* <code>/ > = ! ?</code> or it may be a string wrapped in single quotes or double quotes, or it may be a name. * <code>/ &gt;= ! ?</code> or it may be a string wrapped in single quotes or double quotes, or it may be a name.
* *
* @return a String or a Character. * @return a String or a Character.
* *

View File

@ -201,7 +201,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
} }
/** /**
* Do not use this. Instead use FlagManager.<method> in your code. * Do not use this. Instead use FlagManager.[method] in your code.
* - Flag related stuff * - Flag related stuff
* *
* @return FlagManager * @return FlagManager
@ -214,7 +214,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
} }
/** /**
* Do not use this. Instead use ClusterManager.<method> in your code. * Do not use this. Instead use ClusterManager.[method] in your code.
* - Plot cluster related stuff * - Plot cluster related stuff
* *
* @return ClusterManager * @return ClusterManager
@ -227,7 +227,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
} }
/** /**
* Do not use this. Instead use MainUtil.<method> in your code. * Do not use this. Instead use MainUtil.[method] in your code.
* - Basic plot management stuff * - Basic plot management stuff
* *
* @return MainUtil * @return MainUtil
@ -240,7 +240,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
} }
/** /**
* Do not use this. Instead use Permissions.<method> in your code. * Do not use this. Instead use Permissions.[method] in your code.
* - Basic permission management stuff * - Basic permission management stuff
* *
* @return MainUtil * @return MainUtil
@ -264,7 +264,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
} }
/** /**
* Use C.<caption> instead * Use C.[caption] instead
* *
* @return C * @return C
* *
@ -293,7 +293,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
* Get the plot manager for a world. - Contains useful low level methods for plot merging, clearing, and * Get the plot manager for a world. - Contains useful low level methods for plot merging, clearing, and
* tessellation * tessellation
* *
* @param world Plot World * @param world
* *
* @return PlotManager * @return PlotManager
* *

View File

@ -38,7 +38,7 @@ public class AbstractFlag {
/** /**
* AbstractFlag is a parameter used in creating a new Flag<br> * AbstractFlag is a parameter used in creating a new Flag<br>
* The key must be alphabetical characters and <= 16 characters in length * The key must be alphabetical characters and &lt;= 16 characters in length
* @param key * @param key
*/ */
public AbstractFlag(final String key, final FlagValue<?> value) { public AbstractFlag(final String key, final FlagValue<?> value) {

View File

@ -31,7 +31,7 @@ public class Flag {
* player, you need to register it with PlotSquared. * player, you need to register it with PlotSquared.
* *
* @param key AbstractFlag * @param key AbstractFlag
* @param value Value must be alphanumerical (can have spaces) and be <= 48 characters * @param value Value must be alphanumerical (can have spaces) and be &lt;= 48 characters
* *
* @throws IllegalArgumentException if you provide inadequate inputs * @throws IllegalArgumentException if you provide inadequate inputs
*/ */

View File

@ -171,7 +171,7 @@ public class FlagManager {
/** /**
* *
* @param plot * @param plot
* @return Set<Flag> * @return set of flags
*/ */
public static Set<Flag> getPlotFlags(final Plot plot) { public static Set<Flag> getPlotFlags(final Plot plot) {
return getSettingFlags(plot.world, plot.settings); return getSettingFlags(plot.world, plot.settings);

View File

@ -283,8 +283,8 @@ public class Plot implements Cloneable {
/** /**
* Get the plot hashcode * Get the plot hashcode
* *
* @return integer. You can easily make this a character array <br> xI = c[0] x = c[1 -> xI...] yI = c[xI ... + 1] y * @return integer. You can easily make this a character array <br> xI = c[0] x = c[1 -&gt; xI...] yI = c[xI ... + 1] y
* = c[xI ... + 2 -> yI ...] * = c[xI ... + 2 -&gt; yI ...]
*/ */
@Override @Override
public int hashCode() { public int hashCode() {