Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.type

public final Class ClassStack

extends Object
Class Inheritance
Imports
java.util.ArrayList, com.fasterxml.jackson.databind.JavaType

Simple helper class used to keep track of 'call stack' for classes being referenced (as well as unbound variables)
Since
2.7

Field Summary

Modifier and TypeField and Description
protected final Class<?>
protected final ClassStack
private ArrayList<ResolvedRecursiveType>

Constructor Summary

AccessConstructor and Description
public
ClassStack(Class<?> rootType)

private
ClassStack(ClassStack parent, Class<?> curr)

Method Summary

Modifier and TypeMethod and Description
public void
addSelfReference(ResolvedRecursiveType ref)

Method called to indicate that there is a self-reference from deeper down in stack pointing into type this stack frame represents.

public ClassStack

Returns:

New stack frame, if addition is ok; null if not
child
(Class<?> cls)

public ClassStack
find(Class<?> cls)

public void
resolveSelfReferences(JavaType resolved)

Method called when type that this stack frame represents is fully resolved, allowing self-references to be completed (if there are any)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_currentback to summary
protected final Class<?> _current
_parentback to summary
protected final ClassStack _parent
_selfRefsback to summary
private ArrayList<ResolvedRecursiveType> _selfRefs

Constructor Detail

ClassStackback to summary
public ClassStack(Class<?> rootType)
ClassStackback to summary
private ClassStack(ClassStack parent, Class<?> curr)

Method Detail

addSelfReferenceback to summary
public void addSelfReference(ResolvedRecursiveType ref)

Method called to indicate that there is a self-reference from deeper down in stack pointing into type this stack frame represents.

childback to summary
public ClassStack child(Class<?> cls)
Returns:ClassStack

New stack frame, if addition is ok; null if not

findback to summary
public ClassStack find(Class<?> cls)
resolveSelfReferencesback to summary
public void resolveSelfReferences(JavaType resolved)

Method called when type that this stack frame represents is fully resolved, allowing self-references to be completed (if there are any)

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override