-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start work on #3950: add skeletal IterationType (to merge to 3.0)
- Loading branch information
1 parent
cc02b19
commit a42a015
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/main/java/com/fasterxml/jackson/databind/type/IterationType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.fasterxml.jackson.databind.type; | ||
|
||
import com.fasterxml.jackson.databind.JavaType; | ||
|
||
/** | ||
* Specialized {@link SimpleType} for types that are allow iteration | ||
* over Collection(-like) types: this includes types like | ||
* {@link java.util.Iterator}. | ||
* Referenced type is accessible using {@link #getContentType()}. | ||
* | ||
* @since 2.16 | ||
*/ | ||
public abstract class IterationType extends SimpleType | ||
{ | ||
private static final long serialVersionUID = 1L; | ||
|
||
protected final JavaType _iteratedType; | ||
|
||
/** | ||
* Constructor used when upgrading into this type (via {@link #upgradeFrom}, | ||
* the usual way for {@link IterationType}s to come into existence. | ||
* Sets up what is considered the "base" reference type | ||
*/ | ||
protected IterationType(TypeBase base, JavaType iteratedType) | ||
{ | ||
super(base); | ||
_iteratedType = iteratedType; | ||
} | ||
} |