Package org.apache.juneau
Class BeanTraverseContext
java.lang.Object
org.apache.juneau.Context
org.apache.juneau.BeanContextable
org.apache.juneau.BeanTraverseContext
- All Implemented Interfaces:
- AnnotationProvider
- Direct Known Subclasses:
- JsonSchemaGenerator,- Serializer
Parent class for all classes that traverse POJOs.
 
Description
Base class that serves as the parent class for all serializers and other classes that traverse POJOs.
Notes:
- This class is thread safe and reusable.
See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from class org.apache.juneau.ContextCONTEXT_APPLY_FILTERFields inherited from interface org.apache.juneau.AnnotationProviderDEFAULT, DISABLE_ANNOTATION_CACHING
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor
- 
Method SummaryModifier and TypeMethodDescriptionabstract BeanTraverseContext.Buildercopy()Creates a builder from this context object.final intInitial depth.final intMax traversal depth.final booleanAutomatically detect POJO recursions.final booleanIgnore recursion errors.protected JsonMapReturns the properties on this bean as a map for debugging.Methods inherited from class org.apache.juneau.BeanContextablegetBeanContextMethods inherited from class org.apache.juneau.ContextcreateBuilder, createSession, firstAnnotation, firstAnnotation, firstAnnotation, firstAnnotation, firstDeclaredAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachDeclaredAnnotation, getSession, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, init, isDebug, lastAnnotation, lastAnnotation, lastAnnotation, lastAnnotation, lastDeclaredAnnotation, toString
- 
Constructor Details- 
BeanTraverseContextConstructor- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
copyDescription copied from class:ContextCreates a builder from this context object.Builders are used to define new contexts (e.g. serializers, parsers) based on existing configurations. 
- 
isDetectRecursionsAutomatically detect POJO recursions.- Returns:
- true if recursions should be checked for during traversal.
- See Also:
 
- 
isIgnoreRecursionsIgnore recursion errors.- Returns:
- true if when we encounter the same object when traversing a tree, we set the value to- null .
 Otherwise, an exception is thrown with the message- "Recursion occurred, stack=..." .
- See Also:
 
- 
getInitialDepthInitial depth.- Returns:
- The initial indentation level at the root.
- See Also:
 
- 
getMaxDepthMax traversal depth.- Returns:
- The depth at which traversal is aborted if depth is reached in the POJO tree.
   
 If this depth is exceeded, an exception is thrown.
- See Also:
 
- 
propertiesDescription copied from class:ContextReturns the properties on this bean as a map for debugging.- Overrides:
- propertiesin class- BeanContextable
- Returns:
- The properties on this bean as a map for debugging.
 
 
-