Top Description Fields Constructors Methods
com.fasterxml.classmate.util

public final Class ClassStack

extends Object
Class Inheritance
Imports
java.util.ArrayList, com.fasterxml.classmate.ResolvedType, com.fasterxml.classmate.types.ResolvedRecursiveType

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

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(ResolvedType resolved)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

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(ResolvedType resolved)

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