Skip to content

Commit a42a015

Browse files
committed
Start work on #3950: add skeletal IterationType (to merge to 3.0)
1 parent cc02b19 commit a42a015

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.fasterxml.jackson.databind.type;
2+
3+
import com.fasterxml.jackson.databind.JavaType;
4+
5+
/**
6+
* Specialized {@link SimpleType} for types that are allow iteration
7+
* over Collection(-like) types: this includes types like
8+
* {@link java.util.Iterator}.
9+
* Referenced type is accessible using {@link #getContentType()}.
10+
*
11+
* @since 2.16
12+
*/
13+
public abstract class IterationType extends SimpleType
14+
{
15+
private static final long serialVersionUID = 1L;
16+
17+
protected final JavaType _iteratedType;
18+
19+
/**
20+
* Constructor used when upgrading into this type (via {@link #upgradeFrom},
21+
* the usual way for {@link IterationType}s to come into existence.
22+
* Sets up what is considered the "base" reference type
23+
*/
24+
protected IterationType(TypeBase base, JavaType iteratedType)
25+
{
26+
super(base);
27+
_iteratedType = iteratedType;
28+
}
29+
}

0 commit comments

Comments
 (0)