Skip to content

Commit c57aece

Browse files
fixing jdocs
1 parent 6206993 commit c57aece

File tree

11 files changed

+42
-43
lines changed

11 files changed

+42
-43
lines changed

SerialX-core/src/main/java/org/ugp/serialx/GenericScope.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ public <K, V> GenericScope<K, V> getGenericScope(K... pathToScope)
553553
/**
554554
* @param type | Class of object to create (may or may not support other implementations of {@link Type}).
555555
*
556-
* @return Object of type constructed from this scopes independent values using protocol for given class or null if there was no protocol found in {@link Serializer#PROTOCOL_REGISTRY}!
556+
* @return Object of type constructed from this scopes independent values using protocol for given class or null if there was no protocol found in {@link SerializationProtocol#REGISTRY}!
557557
*
558558
* @throws Exception | Exception if Exception occurred in {@link SerializationProtocol#unserialize(Class, Object...)}!
559559
*

SerialX-core/src/main/java/org/ugp/serialx/Scope.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ public Scope getScope(String... pathToScope)
702702
* If independent value is {@link GenericScope} like it supposed to, then values of scope are parsed to {@link SerializationProtocol} of objClass.
703703
* Note: Scopes are searched via regular independent value index no scope index like {@link Scope#getScope(int)}.
704704
*
705-
* @see Serializer#PROTOCOL_REGISTRY
705+
* @see SerializationProtocol#REGISTRY
706706
* @see GenericScope#toObject(Class)
707707
*
708708
* @throws Exception if Exception occurred in {@link SerializationProtocol#unserialize(Class, Object...)}!
@@ -725,7 +725,7 @@ public <T> T toObjectOf(int scopesValueIndex, Class<T> objClass) throws Exceptio
725725
* @return Value of variable with name or null if there is no such a one! If there is no Scope<Object, ?> stored by variableWithScope this function behaves same as {@link Scope#get(String, Object)}!
726726
* If variableWithScope contains {@link GenericScope} like it supposed to, then values of scope are parsed to {@link SerializationProtocol} of objClass.
727727
*
728-
* @see Serializer#PROTOCOL_REGISTRY
728+
* @see SerializationProtocol#REGISTRY
729729
* @see GenericScope#toObject(Class)
730730
*
731731
* @throws Exception if Exception occurred in {@link SerializationProtocol#unserialize(Class, Object...)}!
@@ -745,7 +745,7 @@ public <T> T toObjectOf(String variableWithscope, Class<T> objClass) throws Exce
745745
* @return Value of variable with name or defaultValue if there is no such a one or given key contains null! If there is no Scope<Object, ?> stored by variableWithScope this function behaves same as {@link Scope#get(String, Object)}!
746746
* If variableWithScope contains {@link GenericScope} like it supposed to, then values of scope are parsed to {@link SerializationProtocol} of objClass.
747747
*
748-
* @see Serializer#PROTOCOL_REGISTRY
748+
* @see SerializationProtocol#REGISTRY
749749
* @see GenericScope#toObject(Class)
750750
*
751751
* @throws Exception if Exception occurred in {@link SerializationProtocol#unserialize(Class, Object...)}!
@@ -766,7 +766,7 @@ public <T> T toObjectOf(String variableWithscope, Class<T> objClass, T defaultVa
766766
* @return Value of variable with name or defaultValue if there is no such a one or given key contains null! If there is no Scope<Object, ?> stored by variableWithScope this function behaves same as {@link Scope#get(String, Object)}!
767767
* If variableWithScope contains {@link GenericScope} like it supposed to, then values of scope are parsed to {@link SerializationProtocol} of objClass.
768768
*
769-
* @see Serializer#PROTOCOL_REGISTRY
769+
* @see SerializationProtocol#REGISTRY
770770
* @see GenericScope#toObject(Class)
771771
*
772772
* @throws Exception if Exception occurred in {@link SerializationProtocol#unserialize(Class, Object...)}!

SerialX-core/src/main/java/org/ugp/serialx/Serializer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,11 @@ public <T> T getParsed(String variableWithStringValue, Object... args)
651651
</tr>
652652
<tr>
653653
<td>{@link Appendable}</td>
654-
<td>{@link Serializer#SerializeTo(Appendable)}</td>
654+
<td>{@link Serializer#SerializeTo(Appendable, Object...)}</td>
655655
</tr>
656656
<tr>
657657
<td>{@link OutputStream}</td>
658-
<td>{@link Serializer#SerializeTo(OutputStream)}</td>
658+
<td>{@link Serializer#SerializeTo(OutputStream, Object...)}</td>
659659
</tr>
660660
<tr>
661661
<td>{@link URL}</td>
@@ -755,7 +755,7 @@ public static <T> T into(Object obj, Serializer fromSerializer, String... fieldN
755755
/**
756756
* @param newInstance | New instance of specific {@link Serializer}
757757
* @param fromObj | Object to create serializer from!
758-
* @param fieldNamesToUse | Array of obj field names to map into scopes variables using getters (read method)! {@link PropertyDescriptor}s of these fields will be obtained using {@link GenericScope#getPropertyDescriptorsOf(Class, String...)}! This is used only as a last (default) option!
758+
* @param fieldNamesToUse | Array of obj field names to map into scopes variables using getters (read method)! {@link PropertyDescriptor}s of these fields will be obtained using {@link Scope#getPropertyDescriptorsOf(Class, String...)}! This is used only as a last (default) option!
759759
*
760760
* @return {@link Serializer} created from given fromObj by mapping obj's fields into variables of created serializer via given fields (fieldNamesToUse) and conversion rules listed below!!<br><br>
761761
* Table of specific Object --> Serializer conversions:
@@ -772,23 +772,23 @@ <th>Obtained serializer content (return)</th>
772772
</tr>
773773
<tr>
774774
<td>{@link CharSequence}</td>
775-
<td>{@link Serializer#LoadFrom(CharSequence)}</td>
775+
<td>{@link Serializer#LoadFrom(CharSequence, Object...)}</td>
776776
</tr>
777777
<tr>
778778
<td>{@link CharSequence} (as http address)</td>
779779
<td>Serializer (newInstance) will open connection with url and get + deserialize the content from it if possible!</td>
780780
</tr>
781781
<tr>
782782
<td>{@link File}</td>
783-
<td>{@link Serializer#LoadFrom(File)}</td>
783+
<td>{@link Serializer#LoadFrom(File, Object...)}</td>
784784
</tr>
785785
<tr>
786786
<td>{@link Reader}</td>
787787
<td>{@link Serializer#LoadFrom(Reader)}</td>
788788
</tr>
789789
<tr>
790790
<td>{@link InputStream}</td>
791-
<td>{@link Serializer#LoadFrom(InputStream)}</td>
791+
<td>{@link Serializer#LoadFrom(InputStream, Object...)}</td>
792792
</tr>
793793
<tr>
794794
<td>{@link URL}</td>

SerialX-core/src/main/java/org/ugp/serialx/Utils.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static String LoadFileToString(File f) throws IOException
5151
/**
5252
* @param f | Source file.
5353
* @param endlMode | 0 = no line brakes, 1 = always line brakes, 2 = line break only when contains with "//"! <br>
54-
* Note: You almost always want endlMode on 1. So thats why you should use {@link Serializer#LoadFileToString(File)} which is doing this automatically!
54+
* Note: You almost always want endlMode on 1. So thats why you should use {@link #LoadFileToString(File)} which is doing this automatically!
5555
*
5656
* @return Content of file as string.
5757
* @throws IOException
@@ -66,7 +66,7 @@ public static String LoadFileToString(File f, int endlMode) throws IOException
6666
/**
6767
* @param input | Input stream to read to string!
6868
* @param endlMode | 0 = no line brakes, 1 = always line brakes, 2 = line break only when contains with "//"! <br>
69-
* Note: You almost always want endlMode on 1. So thats why you should use {@link Serializer#LoadFileToString(File)} which is doing this automatically!
69+
* Note: You almost always want endlMode on 1. So thats why you should use {@link #LoadFileToString(File)} which is doing this automatically!
7070
*
7171
* @return Reader converted to string form!
7272
*
@@ -82,7 +82,7 @@ public static String StreamToString(InputStream input, int endlMode) throws IOEx
8282
/**
8383
* @param input | Input reader!
8484
* @param endlMode | 0 = no line brakes, 1 = always line brakes, 2 = line break only when contains with "//"! <br>
85-
* Note: You almost always want endlMode on 1. So thats why you should use {@link Serializer#LoadFileToString(File)} which is doing this automatically!
85+
* Note: You almost always want endlMode on 1. So thats why you should use {@link #LoadFileToString(File)} which is doing this automatically!
8686
*
8787
* @return Reader converted to string form!
8888
*
@@ -113,7 +113,7 @@ public static String StreamToString(Reader input, int endlMode) throws IOExcepti
113113
* @param name | Name of public static method to be called.
114114
* @param args | Arguments of method. Arguments should be certain if method is overloaded!
115115
*
116-
* @return The returned result of called method or {@link Serializer#VOID} if return type of method is void. If something when wrong you will be notified and null will be returned.
116+
* @return The returned result of called method or {@link #VOID} if return type of method is void. If something when wrong you will be notified and null will be returned.
117117
*
118118
* @throws InvocationTargetException if called method throws and exception while calling!
119119
*
@@ -129,7 +129,7 @@ public static Object InvokeStaticFunc(Class<?> cls, String name, Object... args)
129129
* @param name | Name of public static method to be called.
130130
* @param args | Arguments of method. Arguments should be certain if method is overloaded!
131131
*
132-
* @return The returned result of called method or {@link Serializer#VOID} if return type of method is void. If something when wrong you will be notified and null will be returned.
132+
* @return The returned result of called method or {@link #VOID} if return type of method is void. If something when wrong you will be notified and null will be returned.
133133
*
134134
* @throws InvocationTargetException if called method throws and exception while calling!
135135
*
@@ -146,7 +146,7 @@ public static Object InvokeFunc(Object obj, String name, Object... args) throws
146146
* @param name | Name of public static method to be called.
147147
* @param args | Arguments of method. Arguments should be certain if method is overloaded!
148148
*
149-
* @return The returned result of called method or {@link Serializer#VOID} if return type of method is void. If something when wrong you will be notified and null will be returned.
149+
* @return The returned result of called method or {@link #VOID} if return type of method is void. If something when wrong you will be notified and null will be returned.
150150
*
151151
* @throws InvocationTargetException if called method throws and exception while calling!
152152
*
@@ -170,7 +170,7 @@ public static Object InvokeFunc(Object obj, Class<?> objCls, String name, Object
170170
* @param argClasses | Classes of args.
171171
* @param args | Arguments of method. Arguments should be certain if method is overloaded!
172172
*
173-
* @return The returned result of called method or {@link Serializer#VOID} if return type of method is void. If something when wrong you will be notified and null will be returned.
173+
* @return The returned result of called method or {@link #VOID} if return type of method is void. If something when wrong you will be notified and null will be returned.
174174
*
175175
* @throws InvocationTargetException if called method throws and exception while calling!
176176
*

SerialX-core/src/main/java/org/ugp/serialx/converters/VariableParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public Object parse(ParserRegistry myHomeRegistry, String str, Object... args)
3636
* @param source | Source object to get value of the member from (may or may not be null). Source should not be modified!
3737
* @param member | Name/key of the member to get.
3838
*
39-
* @return The value of member from given source. You can think about this as ekvivalent to <code>source.member</code> in Java. If member with provided name/key is not present in the source or its value is not possible to get, {@link VOID} has to be returned! If source can't be accessed/dereferenced, <code>null</code> has to be returned!<br>
39+
* @return The value of member from given source. You can think about this as ekvivalent to <code>source.member</code> in Java. If member with provided name/key is not present in the source or its value is not possible to get, {@link #VOID} has to be returned! If source can't be accessed/dereferenced, <code>null</code> has to be returned!<br>
4040
* Note: This method is meant to be overridden in order to add support for accessing multiple sources because by default it supports only {@link GenericScope}
4141
*
4242
* @since 1.3.8

SerialX-json/src/main/java/org/ugp/serialx/json/JsonSerializer.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,23 +296,23 @@ <th>Obtained serializer content (return)</th>
296296
</tr>
297297
<tr>
298298
<td>{@link CharSequence}</td>
299-
<td>{@link Serializer#LoadFrom(CharSequence)}</td>
299+
<td>{@link Serializer#LoadFrom(CharSequence, Object...)}</td>
300300
</tr>
301301
<tr>
302302
<td>{@link CharSequence} (as http address)</td>
303303
<td>Serializer (newInstance) will open connection with url and get + deserialize the content from it if possible!</td>
304304
</tr>
305305
<tr>
306306
<td>{@link File}</td>
307-
<td>{@link Serializer#LoadFrom(File)}</td>
307+
<td>{@link Serializer#LoadFrom(File, Object...)}</td>
308308
</tr>
309309
<tr>
310310
<td>{@link Reader}</td>
311311
<td>{@link Serializer#LoadFrom(Reader)}</td>
312312
</tr>
313313
<tr>
314314
<td>{@link InputStream}</td>
315-
<td>{@link Serializer#LoadFrom(InputStream)}</td>
315+
<td>{@link Serializer#LoadFrom(InputStream, Object...)}</td>
316316
</tr>
317317
<tr>
318318
<td>{@link URL}</td>
@@ -346,7 +346,7 @@ public static JsonSerializer from(Object fromObj) throws Exception
346346

347347
/**
348348
* @param fromObj | Object to create serializer from!
349-
* @param fieldNamesToUse | Array of obj field names to map into scopes variables using getters (read method)! {@link PropertyDescriptor}s of these fields will be obtained using {@link GenericScope#getPropertyDescriptorsOf(Class, String...)}! This is used only as a last (default) option!
349+
* @param fieldNamesToUse | Array of obj field names to map into scopes variables using getters (read method)! {@link PropertyDescriptor}s of these fields will be obtained using {@link Scope#getPropertyDescriptorsOf(Class, String...)}! This is used only as a last (default) option!
350350
*
351351
* @return {@link JsonSerializer} created from given fromObj by mapping obj's fields into variables of created serializer via given fields (fieldNamesToUse) and conversion rules listed below!!<br><br>
352352
* Table of specific Object --> JsonSerializer conversions:
@@ -363,23 +363,23 @@ <th>Obtained serializer content (return)</th>
363363
</tr>
364364
<tr>
365365
<td>{@link CharSequence}</td>
366-
<td>{@link Serializer#LoadFrom(CharSequence)}</td>
366+
<td>{@link Serializer#LoadFrom(CharSequence, Object...)}</td>
367367
</tr>
368368
<tr>
369369
<td>{@link CharSequence} (as http address)</td>
370370
<td>Serializer (newInstance) will open connection with url and get + deserialize the content from it if possible!</td>
371371
</tr>
372372
<tr>
373373
<td>{@link File}</td>
374-
<td>{@link Serializer#LoadFrom(File)}</td>
374+
<td>{@link Serializer#LoadFrom(File, Object...)}</td>
375375
</tr>
376376
<tr>
377377
<td>{@link Reader}</td>
378378
<td>{@link Serializer#LoadFrom(Reader)}</td>
379379
</tr>
380380
<tr>
381381
<td>{@link InputStream}</td>
382-
<td>{@link Serializer#LoadFrom(InputStream)}</td>
382+
<td>{@link Serializer#LoadFrom(InputStream, Object...)}</td>
383383
</tr>
384384
<tr>
385385
<td>{@link URL}</td>

SerialX-juss/src/main/java/org/ugp/serialx/juss/JussSerializer.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -784,23 +784,23 @@ <th>Obtained serializer content (return)</th>
784784
</tr>
785785
<tr>
786786
<td>{@link CharSequence}</td>
787-
<td>{@link Serializer#LoadFrom(CharSequence)}</td>
787+
<td>{@link Serializer#LoadFrom(CharSequence, Object...)}</td>
788788
</tr>
789789
<tr>
790790
<td>{@link CharSequence} (as http address)</td>
791791
<td>Serializer (newInstance) will open connection with url and get + deserialize the content from it if possible!</td>
792792
</tr>
793793
<tr>
794794
<td>{@link File}</td>
795-
<td>{@link Serializer#LoadFrom(File)}</td>
795+
<td>{@link Serializer#LoadFrom(File, Object...)}</td>
796796
</tr>
797797
<tr>
798798
<td>{@link Reader}</td>
799799
<td>{@link Serializer#LoadFrom(Reader)}</td>
800800
</tr>
801801
<tr>
802802
<td>{@link InputStream}</td>
803-
<td>{@link Serializer#LoadFrom(InputStream)}</td>
803+
<td>{@link Serializer#LoadFrom(InputStream, Object...)}</td>
804804
</tr>
805805
<tr>
806806
<td>{@link URL}</td>
@@ -834,7 +834,7 @@ public static JussSerializer from(Object fromObj) throws Exception
834834

835835
/**
836836
* @param fromObj | Object to create serializer from!
837-
* @param fieldNamesToUse | Array of obj field names to map into scopes variables using getters (read method)! {@link PropertyDescriptor}s of these fields will be obtained using {@link GenericScope#getPropertyDescriptorsOf(Class, String...)}! This is used only as a last (default) option!
837+
* @param fieldNamesToUse | Array of obj field names to map into scopes variables using getters (read method)! {@link PropertyDescriptor}s of these fields will be obtained using {@link Scope#getPropertyDescriptorsOf(Class, String...)}! This is used only as a last (default) option!
838838
*
839839
* @return {@link JussSerializer} created from given fromObj by mapping obj's fields into variables of created serializer via given fields (fieldNamesToUse) and conversion rules listed below!!<br><br>
840840
* Table of specific Object --> JussSerializer conversions:
@@ -851,23 +851,23 @@ <th>Obtained serializer content (return)</th>
851851
</tr>
852852
<tr>
853853
<td>{@link CharSequence}</td>
854-
<td>{@link Serializer#LoadFrom(CharSequence)}</td>
854+
<td>{@link Serializer#LoadFrom(CharSequence, Object...)}</td>
855855
</tr>
856856
<tr>
857857
<td>{@link CharSequence} (as http address)</td>
858858
<td>Serializer (newInstance) will open connection with url and get + deserialize the content from it if possible!</td>
859859
</tr>
860860
<tr>
861861
<td>{@link File}</td>
862-
<td>{@link Serializer#LoadFrom(File)}</td>
862+
<td>{@link Serializer#LoadFrom(File, Object...)}</td>
863863
</tr>
864864
<tr>
865865
<td>{@link Reader}</td>
866866
<td>{@link Serializer#LoadFrom(Reader)}</td>
867867
</tr>
868868
<tr>
869869
<td>{@link InputStream}</td>
870-
<td>{@link Serializer#LoadFrom(InputStream)}</td>
870+
<td>{@link Serializer#LoadFrom(InputStream, Object...)}</td>
871871
</tr>
872872
<tr>
873873
<td>{@link URL}</td>

SerialX-juss/src/main/java/org/ugp/serialx/juss/converters/VariableConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public CharSequence getDescription(ParserRegistry myHomeRegistry, Object objToDe
159159
* @param genericVar | If true, member is expected be generic (not only string) and further parsing is required, may or may not be used...
160160
* @param args | Some additional args to be used in case of parsing that are provided by called, may or may not be used...
161161
*
162-
* @return By default it returns the previous value of the member. If member with provided name/key is not present in the source or its value is not possible to set, {@link VOID} should be returned!
162+
* @return By default it returns the previous value of the member. If member with provided name/key is not present in the source or its value is not possible to set, {@link #VOID} should be returned!
163163
*
164164
* @since 1.3.8
165165
*/

SerialX-juss/src/main/java/org/ugp/serialx/juss/protocols/AutoProtocol.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.ugp.serialx.juss.protocols;
22

3-
import static org.ugp.serialx.Utils.Instantiate;
43

54
import java.beans.IntrospectionException;
65
import java.beans.PropertyDescriptor;
@@ -12,7 +11,7 @@
1211

1312
import org.ugp.serialx.GenericScope;
1413
import org.ugp.serialx.Scope;
15-
import org.ugp.serialx.Serializer;
14+
import org.ugp.serialx.Utils;
1615
import org.ugp.serialx.protocols.SerializationProtocol;
1716

1817
/**
@@ -126,15 +125,15 @@ public AutoProtocol(Class<T> applicableFor, boolean useScope, List<PropertyDescr
126125
/**
127126
* @param objectClass | Class to create new instance of!
128127
*
129-
* @return New blank instance of required class! When not override, it returns {@link Serializer#Instantiate(objectClass)}
128+
* @return New blank instance of required class! When not override, it returns {@link Utils#Instantiate(Class)}
130129
*
131130
* @throws Exception if any exception occurs (based on implementation).
132131
*
133132
* @since 1.2.2
134133
*/
135134
public T createBlankInstance(Class<? extends T> objectClass) throws Exception
136135
{
137-
return Instantiate(objectClass);
136+
return Utils.Instantiate(objectClass);
138137
}
139138

140139
@Override
@@ -168,7 +167,7 @@ public T unserialize(Class<? extends T> objectClass, Object... args) throws Exce
168167
return Scope.into(obj, (Scope) args[0], fieldDescriptors);
169168
}
170169

171-
for (int i = 0, size = fieldDescriptors.size(); i < size && i < args.length; i++)
170+
for (int i = 0, size = Math.min(fieldDescriptors.size(), args.length); i < size; i++)
172171
{
173172
Method setter = fieldDescriptors.get(i).getWriteMethod();
174173
Type expectedType = setter.getGenericParameterTypes()[0];

0 commit comments

Comments
 (0)