Skip to content

Commit 84dc0fd

Browse files
authored
Merge pull request #95 from SentryMan/type
now type util returns the specific types
2 parents effb6d2 + 6032cf5 commit 84dc0fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

jsonb/src/main/java/io/avaje/jsonb/Types.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,28 @@ private Types() {
3535
/**
3636
* Returns an array type whose elements are all instances of {@code componentType}.
3737
*/
38-
public static Type arrayOf(Type elementType) {
38+
public static GenericArrayType arrayOf(Type elementType) {
3939
return Util.arrayOf(elementType);
4040
}
4141

4242
/**
4343
* Returns a Type that is a List of the given element type.
4444
*/
45-
public static Type listOf(Type elementType) {
45+
public static ParameterizedType listOf(Type elementType) {
4646
return newParameterizedType(List.class, elementType);
4747
}
4848

4949
/**
5050
* Returns a Type that is a Set of the given element type.
5151
*/
52-
public static Type setOf(Type elementType) {
52+
public static ParameterizedType setOf(Type elementType) {
5353
return newParameterizedType(Set.class, elementType);
5454
}
5555

5656
/**
5757
* Returns a Type that is a Stream of the given element type.
5858
*/
59-
public static Type streamOf(Type elementType) {
59+
public static ParameterizedType streamOf(Type elementType) {
6060
return newParameterizedType(Stream.class, elementType);
6161
}
6262

@@ -66,7 +66,7 @@ public static Type streamOf(Type elementType) {
6666
* @param valueElementType The type of the values in the Map.
6767
* @return Type for a Map with String keys and the given value element type.
6868
*/
69-
public static Type mapOf(Type valueElementType) {
69+
public static ParameterizedType mapOf(Type valueElementType) {
7070
return newParameterizedType(Map.class, String.class, valueElementType);
7171
}
7272

0 commit comments

Comments
 (0)