• R/O
  • SSH
  • HTTPS

jsonic: コミット


コミットメタ情報

リビジョン1844 (tree)
日時2014-10-26 18:34:19
作者hizuno

ログメッセージ

(メッセージはありません)

変更サマリ

差分

--- trunk/jsonic-1.3/src/net/arnx/jsonic/JSONException.java (revision 1843)
+++ trunk/jsonic-1.3/src/net/arnx/jsonic/JSONException.java (revision 1844)
@@ -21,9 +21,9 @@
2121 * <table border="1" cellpadding="1" cellspacing="0">
2222 * <caption>Summary of error codes</caption>
2323 * <tr>
24- * <th style="background-color: #CCCCFF; text-align: left;">code(range)</th>
25- * <th style="background-color: #CCCCFF; text-align: left;">error code</th>
26- * <th style="background-color: #CCCCFF; text-align: left;">description</th>
24+ * <th style="background-color: #CCCCFF; text-align: left;">code(range)</th>
25+ * <th style="background-color: #CCCCFF; text-align: left;">error code</th>
26+ * <th style="background-color: #CCCCFF; text-align: left;">description</th>
2727 * </tr>
2828 * <tr><td>000-099</td><td>(all)</td><td>reserved.</td></tr>
2929 * <tr><td rowspan="2">100-199</td><td>100</td><td>fails to format.</td></tr>
@@ -75,6 +75,8 @@
7575
7676 /**
7777 * Returns the line number where the error was found.
78+ *
79+ * @return line number.
7880 */
7981 public long getLineNumber() {
8082 return lineNumber;
@@ -82,6 +84,8 @@
8284
8385 /**
8486 * Returns the column number where the error was found.
87+ *
88+ * @return column number.
8589 */
8690 public long getColumnNumber() {
8791 return columnNumber;
@@ -89,6 +93,8 @@
8993
9094 /**
9195 * Returns the offset in line where the error was found.
96+ *
97+ * @return error offset position number.
9298 */
9399 public long getErrorOffset() {
94100 return offset;
--- trunk/jsonic-1.3/src/net/arnx/jsonic/JSONHint.java (revision 1843)
+++ trunk/jsonic-1.3/src/net/arnx/jsonic/JSONHint.java (revision 1844)
@@ -1,12 +1,12 @@
1-/*
1+/*
22 * Copyright 2014 Hidekatsu Izuno
3- *
3+ *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
66 * You may obtain a copy of the License at
7- *
7+ *
88 * http://www.apache.org/licenses/LICENSE-2.0
9- *
9+ *
1010 * Unless required by applicable law or agreed to in writing, software
1111 * distributed under the License is distributed on an "AS IS" BASIS,
1212 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,37 +27,51 @@
2727 @Retention(RetentionPolicy.RUNTIME)
2828 public @interface JSONHint {
2929 /**
30- * The property name
30+ * The property name
31+ *
32+ * @return the property name.
3133 */
3234 String name() default "";
33-
35+
3436 /**
3537 * The format of Number or Date
38+ *
39+ * @return the format of Number or Date
3640 */
3741 String format() default "";
38-
42+
3943 /**
4044 * The Java type for creation
45+ *
46+ * @return the java type for creation
4147 */
4248 Class<?> type() default Object.class;
43-
49+
4450 /**
4551 * Ignore this property
52+ *
53+ * @return ignore this property if return true.
4654 */
4755 boolean ignore() default false;
48-
56+
4957 /**
5058 * Set the flag that this property is already serialized.
59+ *
60+ * @return handle as JSON serialized value when this hint is true.
5161 */
5262 boolean serialized() default false;
53-
63+
5464 /**
5565 * The default key name for using when converting simple type to struct type.
66+ *
67+ * @return The default key name for using when converting simple type to struct type.
5668 */
5769 String anonym() default "";
58-
70+
5971 /**
6072 * The sort ordinal of property key
73+ *
74+ * @return The sort ordinal of property key
6175 */
6276 int ordinal() default -1;
6377 }
--- trunk/jsonic-1.3/src/net/arnx/jsonic/web/Container.java (revision 1843)
+++ trunk/jsonic-1.3/src/net/arnx/jsonic/web/Container.java (revision 1844)
@@ -225,6 +225,7 @@
225225 * @param method The invoking method.
226226 * @param params The parameters before processing of the target method.
227227 * @return The parameters before processing.
228+ * @throws Exception When any error occurred.
228229 */
229230 public Object[] preinvoke(Object component, Method method, Object... params) throws Exception {
230231 return params;
@@ -315,6 +316,7 @@
315316 * @param method The invoked method.
316317 * @param result The returned value of the target method call.
317318 * @return The returned value after processed.
319+ * @throws Exception When any error occurred.
318320 */
319321 public Object postinvoke(Object component, Method method, Object result) throws Exception {
320322 return result;
--- trunk/jsonic-1.3/src/net/arnx/jsonic/JSON.java (revision 1843)
+++ trunk/jsonic-1.3/src/net/arnx/jsonic/JSON.java (revision 1844)
@@ -589,6 +589,7 @@
589589 /**
590590 * Decodes a json string into a object.
591591 *
592+ * @param <T> return type
592593 * @param source a json string to decode
593594 * @return a decoded object
594595 * @throws JSONException if error occurred when parsing.
@@ -601,6 +602,7 @@
601602 /**
602603 * Decodes a json string into a typed object.
603604 *
605+ * @param <T> return type
604606 * @param source a json string to decode
605607 * @param cls class for converting
606608 * @return a decoded object
@@ -613,6 +615,7 @@
613615 /**
614616 * Decodes a json string into a typed object.
615617 *
618+ * @param <T> return type
616619 * @param source a json string to decode
617620 * @param type type for converting
618621 * @return a decoded object
@@ -626,6 +629,7 @@
626629 /**
627630 * Decodes a json stream into a object. (character encoding should be Unicode)
628631 *
632+ * @param <T> return type
629633 * @param in a json stream to decode
630634 * @return a decoded object
631635 * @throws IOException if I/O error occurred.
@@ -639,6 +643,7 @@
639643 /**
640644 * Decodes a json stream into a object. (character encoding should be Unicode)
641645 *
646+ * @param <T> return type
642647 * @param in a json stream to decode
643648 * @param cls class for converting
644649 * @return a decoded object
@@ -652,6 +657,7 @@
652657 /**
653658 * Decodes a json stream into a object. (character encoding should be Unicode)
654659 *
660+ * @param <T> return type
655661 * @param in a json stream to decode
656662 * @param type type for converting
657663 * @return a decoded object
@@ -666,6 +672,7 @@
666672 /**
667673 * Decodes a json stream into a object.
668674 *
675+ * @param <T> return type
669676 * @param reader a json stream to decode
670677 * @return a decoded object
671678 * @throws IOException if I/O error occurred.
@@ -679,6 +686,7 @@
679686 /**
680687 * Decodes a json stream into a object.
681688 *
689+ * @param <T> return type
682690 * @param reader a json stream to decode
683691 * @param cls class for converting
684692 * @return a decoded object
@@ -692,6 +700,7 @@
692700 /**
693701 * Decodes a json stream into a object.
694702 *
703+ * @param <T> return type
695704 * @param reader a json stream to decode
696705 * @param type type for converting
697706 * @return a decoded object
@@ -960,6 +969,7 @@
960969 * @param source a object to encode.
961970 * @param out a destination to output a json string.
962971 * @return a reference to 'out' object in parameters
972+ * @throws IOException when I/O error occurred.
963973 */
964974 public OutputStream format(Object source, OutputStream out) throws IOException {
965975 format(source, new BufferedWriter(new OutputStreamWriter(out, "UTF-8")));
@@ -972,6 +982,7 @@
972982 * @param source a object to encode.
973983 * @param ap a destination. example: StringBuilder, Writer, ...
974984 * @return a json string
985+ * @throws IOException when I/O error occurred.
975986 */
976987 public Appendable format(Object source, Appendable ap) throws IOException {
977988 OutputSource out;
@@ -1166,6 +1177,7 @@
11661177 /**
11671178 * Converts Map, List, Number, String, Boolean or null to other Java Objects after parsing.
11681179 *
1180+ * @param <T> return type.
11691181 * @param context current context.
11701182 * @param value null or the instance of Map, List, Number, String or Boolean.
11711183 * @param cls class for converting
@@ -1462,6 +1474,7 @@
14621474 /**
14631475 * Returns the key object in any depth. the negative value means relative to current depth.
14641476 *
1477+ * @param depth depth number.
14651478 * @return Root node is '$'. When the parent is a array, the key is Integer, otherwise String.
14661479 */
14671480 public Object getKey(int depth) {
旧リポジトリブラウザで表示