Package com.fasterxml.classmate.util
Class ClassStack
- java.lang.Object
-
- com.fasterxml.classmate.util.ClassStack
-
public final class ClassStack extends java.lang.Object
Simple helper class used to keep track of 'call stack' for classes being referenced (as well as unbound variables)
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<?>
_current
protected ClassStack
_parent
private java.util.ArrayList<ResolvedRecursiveType>
_selfRefs
-
Constructor Summary
Constructors Modifier Constructor Description private
ClassStack(ClassStack parent, java.lang.Class<?> curr)
ClassStack(java.lang.Class<?> rootType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.ClassStack
child(java.lang.Class<?> cls)
ClassStack
find(java.lang.Class<?> cls)
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)
-
-
-
Field Detail
-
_parent
protected final ClassStack _parent
-
_current
protected final java.lang.Class<?> _current
-
_selfRefs
private java.util.ArrayList<ResolvedRecursiveType> _selfRefs
-
-
Constructor Detail
-
ClassStack
public ClassStack(java.lang.Class<?> rootType)
-
ClassStack
private ClassStack(ClassStack parent, java.lang.Class<?> curr)
-
-
Method Detail
-
child
public ClassStack child(java.lang.Class<?> cls)
- Returns:
- New stack frame, if addition is ok; null if not
-
addSelfReference
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.
-
resolveSelfReferences
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)
-
find
public ClassStack find(java.lang.Class<?> cls)
-
-