Skip to content

Commit

Permalink
Merge pull request #95 from SentryMan/type
Browse files Browse the repository at this point in the history
now type util returns the specific types
  • Loading branch information
rbygrave authored Apr 3, 2023
2 parents effb6d2 + 6032cf5 commit 84dc0fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jsonb/src/main/java/io/avaje/jsonb/Types.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,28 @@ private Types() {
/**
* Returns an array type whose elements are all instances of {@code componentType}.
*/
public static Type arrayOf(Type elementType) {
public static GenericArrayType arrayOf(Type elementType) {
return Util.arrayOf(elementType);
}

/**
* Returns a Type that is a List of the given element type.
*/
public static Type listOf(Type elementType) {
public static ParameterizedType listOf(Type elementType) {
return newParameterizedType(List.class, elementType);
}

/**
* Returns a Type that is a Set of the given element type.
*/
public static Type setOf(Type elementType) {
public static ParameterizedType setOf(Type elementType) {
return newParameterizedType(Set.class, elementType);
}

/**
* Returns a Type that is a Stream of the given element type.
*/
public static Type streamOf(Type elementType) {
public static ParameterizedType streamOf(Type elementType) {
return newParameterizedType(Stream.class, elementType);
}

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

Expand Down

0 comments on commit 84dc0fd

Please sign in to comment.