Skip to content

Commit

Permalink
Start work on #3950: add skeletal IterationType (to merge to 3.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 23, 2023
1 parent cc02b19 commit a42a015
Showing 1 changed file with 29 additions and 0 deletions.
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;
}
}

0 comments on commit a42a015

Please sign in to comment.