Skip to content

Commit a4f0d77

Browse files
fix for #10 - fix javadoc errors (#11)
Also Requires running fmt-m-p, and skips deploying parent module
1 parent d84e994 commit a4f0d77

16 files changed

+589
-106
lines changed

gwt-core/pom.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,12 @@
9393
<moduleName>org.gwtproject.core.Core</moduleName>
9494
</configuration>
9595
</plugin>
96-
<!-- TODO: El Hoss: When clear, while the plugin fails to work on the GwtIncompatible.java file, remove -->
9796
<plugin>
98-
<groupId>com.coveo</groupId>
99-
<artifactId>fmt-maven-plugin</artifactId>
100-
<version>${maven.fmt.plugin}</version>
97+
<groupId>org.apache.maven.plugins</groupId>
98+
<artifactId>maven-deploy-plugin</artifactId>
99+
<version>${maven.deploy.plugin}</version>
101100
<configuration>
102-
<skip>true</skip>
101+
<skip>false</skip>
103102
</configuration>
104103
</plugin>
105104
</plugins>

gwt-core/src/main/java/org/gwtproject/core/client/Duration.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public class Duration {
2424
* Returns the same result as {@link System#currentTimeMillis()}, but as a double. Because
2525
* emulated long math is significantly slower than doubles in Production Mode, this method is to
2626
* be preferred.
27+
*
28+
* @return current time in millis as double
2729
*/
2830
public static double currentTimeMillis() {
2931
return JsDate.now();
@@ -34,12 +36,20 @@ public static double currentTimeMillis() {
3436
/** Creates a new Duration whose start time is now. */
3537
public Duration() {}
3638

37-
/** Returns the number of milliseconds that have elapsed since this object was created. */
39+
/**
40+
* returns the number of milliseconds that have elapsed since this object was created.
41+
*
42+
* @return milliseconds
43+
*/
3844
public int elapsedMillis() {
3945
return Js.coerceToInt(currentTimeMillis() - start);
4046
}
4147

42-
/** Returns the time when the object was created. */
48+
/**
49+
* Returns the time when the object was created.
50+
*
51+
* @return creation time
52+
*/
4353
public double getStartMillis() {
4454
return start;
4555
}

gwt-core/src/main/java/org/gwtproject/core/client/JavaScriptObject.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@
3838
@Deprecated
3939
@JsType(isNative = true, name = "Object", namespace = JsPackage.GLOBAL)
4040
public class JavaScriptObject {
41-
/** Returns a new array. */
41+
/**
42+
* Returns a new array.
43+
*
44+
* @return a new array
45+
*/
4246
@JsOverlay
4347
public static JavaScriptObject createArray() {
4448
return Js.cast(new JsArray<>());
@@ -49,19 +53,30 @@ public static JavaScriptObject createArray() {
4953
*
5054
* <p>Consider using this method in performance critical code instead of using {@link
5155
* #createArray()}, since this gives more hints to the underlying JavaScript VM for optimizations.
56+
*
57+
* @param size size of array
58+
* @return array as JavaScript object
5259
*/
5360
@JsOverlay
5461
public static JavaScriptObject createArray(int size) {
5562
return Js.cast(new JsArray<>((double) size));
5663
}
5764

58-
/** Returns an empty function. */
65+
/**
66+
* Returns an empty function.
67+
*
68+
* @return function as JavaScript object
69+
*/
5970
@JsOverlay
6071
public static JavaScriptObject createFunction() {
6172
return Js.cast(new Function());
6273
}
6374

64-
/** Returns a new object. */
75+
/**
76+
* Returns a new object.
77+
*
78+
* @return object as JavaScript object
79+
*/
6580
@JsOverlay
6681
public static JavaScriptObject createObject() {
6782
return new JavaScriptObject();

gwt-core/src/main/java/org/gwtproject/core/client/JsArray.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* <p>This class may not be directly instantiated, and can only be returned from a native method.
2727
* For example, <code>
28-
* native JsArray<JavaScriptObject> getNativeArray() /*-{
28+
* native JsArray&lt;JavaScriptObject&gt; getNativeArray() /*-{
2929
* return [
3030
* { x: 0, y: 1},
3131
* { x: 2, y: 3},
@@ -57,6 +57,8 @@ public final T get(int index) {
5757
* Convert each element of the array to a String and join them with a comma separator. The value
5858
* returned from this method may vary between browsers based on how JavaScript values are
5959
* converted into strings.
60+
*
61+
* @return resulting String
6062
*/
6163
@JsOverlay
6264
public final String join() {
@@ -67,6 +69,9 @@ public final String join() {
6769
* Convert each element of the array to a String and join them with a comma separator. The value
6870
* returned from this method may vary between browsers based on how JavaScript values are
6971
* converted into strings.
72+
*
73+
* @param separator separator to use
74+
* @return String containing all elements of the array. Each element separated using the separator
7075
*/
7176
@JsOverlay
7277
public final String join(String separator) {
@@ -83,7 +88,11 @@ public final int length() {
8388
return this.<elemental2.core.JsArray<T>>cast().length;
8489
}
8590

86-
/** Pushes the given value onto the end of the array. */
91+
/**
92+
* Pushes the given value onto the end of the array.
93+
*
94+
* @param value value to push
95+
*/
8796
public final native void push(T value);
8897

8998
/**

gwt-core/src/main/java/org/gwtproject/core/client/JsArrayBoolean.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public final boolean get(int index) {
5353
* Convert each element of the array to a String and join them with a comma separator. The value
5454
* returned from this method may vary between browsers based on how JavaScript values are
5555
* converted into strings.
56+
*
57+
* @return all elements jointed into a String separated by comma
5658
*/
5759
@JsOverlay
5860
public final String join() {
@@ -63,6 +65,9 @@ public final String join() {
6365
* Convert each element of the array to a String and join them with a comma separator. The value
6466
* returned from this method may vary between browsers based on how JavaScript values are
6567
* converted into strings.
68+
*
69+
* @param separator separator to use
70+
* @return all elements jointed into a String separated by the given separator
6671
*/
6772
@JsOverlay
6873
public final String join(String separator) {
@@ -79,7 +84,11 @@ public final int length() {
7984
return this.<elemental2.core.JsArray<Boolean>>cast().length;
8085
}
8186

82-
/** Pushes the given boolean onto the end of the array. */
87+
/**
88+
* Pushes the given boolean onto the end of the array.
89+
*
90+
* @param value boolean value to push
91+
*/
8392
public final native void push(boolean value);
8493

8594
/**

gwt-core/src/main/java/org/gwtproject/core/client/JsArrayInteger.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public final int get(int index) {
5656
* Convert each element of the array to a String and join them with a comma separator. The value
5757
* returned from this method may vary between browsers based on how JavaScript values are
5858
* converted into strings.
59+
*
60+
* @return all elements jointed into a String separated by comma
5961
*/
6062
@JsOverlay
6163
public final String join() {
@@ -66,6 +68,9 @@ public final String join() {
6668
* Convert each element of the array to a String and join them with a comma separator. The value
6769
* returned from this method may vary between browsers based on how JavaScript values are
6870
* converted into strings.
71+
*
72+
* @param separator separator to use
73+
* @return all elements jointed into a String separated by the given separator
6974
*/
7075
@JsOverlay
7176
public final String join(String separator) {
@@ -82,7 +87,11 @@ public final int length() {
8287
return this.<JsArray<Double>>cast().length;
8388
}
8489

85-
/** Pushes the given integer onto the end of the array. */
90+
/**
91+
* Pushes the given integer onto the end of the array.
92+
*
93+
* @param value int value to push
94+
*/
8695
public final native void push(int value);
8796

8897
/**

gwt-core/src/main/java/org/gwtproject/core/client/JsArrayMixed.java

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public final double getNumber(int index) {
6666
/**
6767
* Gets the {@link org.gwtproject.core.client.JavaScriptObject} at a given index.
6868
*
69+
* @param <T> type extending JavaScriptObject
6970
* @param index the index to be retrieved
7071
* @return the {@code JavaScriptObject} at the given index, or <code>null</code> if none exists
7172
*/
@@ -92,6 +93,8 @@ public final String getString(int index) {
9293
* Convert each element of the array to a String and join them with a comma separator. The value
9394
* returned from this method may vary between browsers based on how JavaScript values are
9495
* converted into strings.
96+
*
97+
* @return all elements jointed into a String separated by comma
9598
*/
9699
@JsOverlay
97100
public final String join() {
@@ -102,6 +105,9 @@ public final String join() {
102105
* Convert each element of the array to a String and join them with a comma separator. The value
103106
* returned from this method may vary between browsers based on how JavaScript values are
104107
* converted into strings.
108+
*
109+
* @param separator separator to use
110+
* @return all elements jointed into a String separated by the given separator
105111
*/
106112
@JsOverlay
107113
public final String join(String separator) {
@@ -118,18 +124,32 @@ public final int length() {
118124
return this.<JsArray<Object>>cast().length;
119125
}
120126

121-
/** Pushes the given boolean onto the end of the array. */
127+
/**
128+
* Pushes the given boolean onto the end of the array.
129+
*
130+
* @param value boolean value to push
131+
*/
122132
public final native void push(boolean value);
123133

124-
/** Pushes the given double onto the end of the array. */
134+
/**
135+
* Pushes the given double onto the end of the array.
136+
*
137+
* @param value double value to push
138+
*/
125139
public final native void push(double value);
126140

127141
/**
128142
* Pushes the given {@link org.gwtproject.core.client.JavaScriptObject} onto the end of the array.
143+
*
144+
* @param value JavaScriptObject value to push
129145
*/
130146
public final native void push(JavaScriptObject value);
131147

132-
/** Pushes the given String onto the end of the array. */
148+
/**
149+
* Pushes the given String onto the end of the array.
150+
*
151+
* @param value String value to push
152+
*/
133153
public final native void push(String value);
134154

135155
/**
@@ -221,6 +241,7 @@ public final double shiftNumber() {
221241
/**
222242
* Shifts the first value off the array.
223243
*
244+
* @param <T> type extending JavaScriptObject
224245
* @return the shifted {@link org.gwtproject.core.client.JavaScriptObject}
225246
*/
226247
@JsOverlay

gwt-core/src/main/java/org/gwtproject/core/client/JsArrayNumber.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public final double get(int index) {
5858
* Convert each element of the array to a String and join them with a comma separator. The value
5959
* returned from this method may vary between browsers based on how JavaScript values are
6060
* converted into strings.
61+
*
62+
* @return all elements jointed into a String separated by comma
6163
*/
6264
@JsOverlay
6365
public final String join() {
@@ -68,6 +70,9 @@ public final String join() {
6870
* Convert each element of the array to a String and join them with a comma separator. The value
6971
* returned from this method may vary between browsers based on how JavaScript values are
7072
* converted into strings.
73+
*
74+
* @param separator separator to use
75+
* @return all elements jointed into a String separated by the given separator
7176
*/
7277
@JsOverlay
7378
public final String join(String separator) {
@@ -84,7 +89,11 @@ public final int length() {
8489
return this.<JsArray<Number>>cast().length;
8590
}
8691

87-
/** Pushes the given number onto the end of the array. */
92+
/**
93+
* Pushes the given number onto the end of the array.
94+
*
95+
* @param value double value to push
96+
*/
8897
public final native void push(double value);
8998

9099
/**

gwt-core/src/main/java/org/gwtproject/core/client/JsArrayString.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public final String get(int index) {
5353
* Convert each element of the array to a String and join them with a comma separator. The value
5454
* returned from this method may vary between browsers based on how JavaScript values are
5555
* converted into strings.
56+
*
57+
* @return all elements jointed into a String separated by comma
5658
*/
5759
@JsOverlay
5860
public final String join() {
@@ -63,6 +65,9 @@ public final String join() {
6365
* Convert each element of the array to a String and join them with a comma separator. The value
6466
* returned from this method may vary between browsers based on how JavaScript values are
6567
* converted into strings.
68+
*
69+
* @param separator separator to use
70+
* @return all elements jointed into a String separated by the given separator
6671
*/
6772
@JsOverlay
6873
public final String join(String separator) {
@@ -79,7 +84,11 @@ public final int length() {
7984
return this.<JsArray<String>>cast().length;
8085
}
8186

82-
/** Pushes the given value onto the end of the array. */
87+
/**
88+
* Pushes the given value onto the end of the array.
89+
*
90+
* @param value String value to push
91+
*/
8392
public final native void push(String value);
8493

8594
/**

gwt-core/src/main/java/org/gwtproject/core/client/JsArrayUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public static JsArrayInteger readOnlyJsArray(short[] array) {
105105
* reference to the original array in prod mode, the source must not be modified while this copy
106106
* is in use or you will get different behavior between DevMode and prod mode.
107107
*
108+
* @param <T> type extending JavaScriptObject
108109
* @param array source array
109110
* @return JS array, which may be a copy or an alias of the input array
110111
*/

0 commit comments

Comments
 (0)