Class DataObjectDeque
- java.lang.Object
-
- io.smallrye.openapi.runtime.scanner.dataobject.DataObjectDeque
-
public class DataObjectDeque extends Object
Deque for exploring object graph.- Author:
- Marc Savy <marc@rhymewithgravy.com>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDataObjectDeque.PathEntryAn entry on the object stack.
-
Constructor Summary
Constructors Constructor Description DataObjectDeque(AugmentedIndexView index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEmpty()DataObjectDeque.PathEntryleafNode(DataObjectDeque.PathEntry parentNode, org.jboss.jandex.AnnotationTarget annotationTarget, org.jboss.jandex.Type classType, org.eclipse.microprofile.openapi.models.media.Schema schema)Create a leaf node (i.e.DataObjectDeque.PathEntrypeek()Look at top of stack, but don't remove.DataObjectDeque.PathEntrypop()Remove and return top element from stack.voidpush(DataObjectDeque.PathEntry entry)Push entry to stack.voidpush(org.jboss.jandex.AnnotationTarget annotationTarget, DataObjectDeque.PathEntry parentPathEntry, org.jboss.jandex.Type type, org.eclipse.microprofile.openapi.models.media.Schema schema)Create new entry and push to stack.DataObjectDeque.PathEntryrootNode(org.jboss.jandex.AnnotationTarget annotationTarget, org.jboss.jandex.ClassInfo classInfo, org.jboss.jandex.Type type, org.eclipse.microprofile.openapi.models.media.Schema rootSchema)Create a root node (first entry in graph).intsize()
-
-
-
Constructor Detail
-
DataObjectDeque
public DataObjectDeque(AugmentedIndexView index)
-
-
Method Detail
-
size
public int size()
- Returns:
- the number of elements in this Deque
- See Also:
Deque.size()
-
isEmpty
public boolean isEmpty()
- Returns:
- true if no elements in this Deque
- See Also:
Collection.isEmpty()
-
peek
public DataObjectDeque.PathEntry peek()
Look at top of stack, but don't remove.- Returns:
- the top element of the stack
- See Also:
Deque.peek()
-
push
public void push(DataObjectDeque.PathEntry entry)
Push entry to stack. Does not perform cycle detection.- Parameters:
entry- the entry- See Also:
Deque.push(Object)
-
pop
public DataObjectDeque.PathEntry pop()
Remove and return top element from stack.- Returns:
- the top element of the stack
- See Also:
Deque.pop()
-
push
public void push(org.jboss.jandex.AnnotationTarget annotationTarget, DataObjectDeque.PathEntry parentPathEntry, org.jboss.jandex.Type type, org.eclipse.microprofile.openapi.models.media.Schema schema)Create new entry and push to stack. Performs cycle detection.- Parameters:
annotationTarget- annotation targetparentPathEntry- parent path entrytype- the annotated typeschema- the schema corresponding to this position
-
rootNode
public DataObjectDeque.PathEntry rootNode(org.jboss.jandex.AnnotationTarget annotationTarget, org.jboss.jandex.ClassInfo classInfo, org.jboss.jandex.Type type, org.eclipse.microprofile.openapi.models.media.Schema rootSchema)
Create a root node (first entry in graph).- Parameters:
annotationTarget- annotation targettype- the annotated typeclassInfo- the root classInforootSchema- the schema corresponding to this position- Returns:
- a new root node
-
leafNode
public DataObjectDeque.PathEntry leafNode(DataObjectDeque.PathEntry parentNode, org.jboss.jandex.AnnotationTarget annotationTarget, org.jboss.jandex.Type classType, org.eclipse.microprofile.openapi.models.media.Schema schema)
Create a leaf node (i.e. is attached to a parent)- Parameters:
parentNode- parent nodeannotationTarget- annotation targetclassType- the class typeschema- the schema- Returns:
- the new leaf node
-
-