001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.serializer.annotation;
018
019import static java.lang.annotation.ElementType.*;
020import static java.lang.annotation.RetentionPolicy.*;
021
022import java.lang.annotation.*;
023import java.nio.charset.*;
024
025import org.apache.juneau.*;
026import org.apache.juneau.annotation.*;
027import org.apache.juneau.parser.*;
028import org.apache.juneau.serializer.*;
029
030/**
031 * Annotation for specifying config properties defined in {@link Serializer}, {@link OutputStreamSerializer}, and {@link WriterSerializer}.
032 *
033 * <p>
034 * Used primarily for specifying bean configuration properties on REST classes and methods.
035 *
036 * <h5 class='section'>See Also:</h5><ul>
037 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/SerializersAndParsers">Serializers and Parsers</a>
038 * </ul>
039 */
040@Target({TYPE,METHOD})
041@Retention(RUNTIME)
042@Inherited
043@ContextApply({SerializerConfigAnnotation.SerializerApply.class,SerializerConfigAnnotation.OutputStreamSerializerApply.class,SerializerConfigAnnotation.WriterSerializerApply.class})
044public @interface SerializerConfig {
045
046   /**
047    * Optional rank for this config.
048    *
049    * <p>
050    * Can be used to override default ordering and application of config annotations.
051    *
052    * @return The annotation value.
053    */
054   int rank() default 0;
055
056   //-------------------------------------------------------------------------------------------------------------------
057   // OutputStreamSerializer
058   //-------------------------------------------------------------------------------------------------------------------
059
060   /**
061    * Binary output format.
062    *
063    * <p>
064    * When using the {@link OutputStreamSerializer#serializeToString(Object)} method on stream-based serializers, this defines the format to use
065    * when converting the resulting byte array to a string.
066    *
067    * <ul class='values'>
068    *    <li><js>"SPACED_HEX"</js>
069    *    <li><js>"HEX"</js> (default)
070    *    <li><js>"BASE64"</js>
071    * </ul>
072    *
073    * <h5 class='section'>Notes:</h5><ul>
074    *    <li class='note'>
075    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
076    * </ul>
077    *
078    * <h5 class='section'>See Also:</h5><ul>
079    *    <li class='jm'>{@link org.apache.juneau.serializer.OutputStreamSerializer.Builder#binaryFormat(BinaryFormat)}
080    * </ul>
081    *
082    * @return The annotation value.
083    */
084   String binaryFormat() default "";
085
086   //-------------------------------------------------------------------------------------------------------------------
087   // Serializer
088   //-------------------------------------------------------------------------------------------------------------------
089
090   /**
091    * Add <js>"_type"</js> properties when needed.
092    *
093    * <p>
094    * If <js>"true"</js>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
095    * through reflection.
096    *
097    * <p>
098    * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
099    * <br>For example, when serializing a <c>Map&lt;String,Object&gt;</c> field where the bean class cannot be determined from
100    * the type of the values.
101    *
102    * <p>
103    * Note the differences between the following settings:
104    * <ul>
105    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addRootType()} - Affects whether <js>'_type'</js> is added to root node.
106    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addBeanTypes()} - Affects whether <js>'_type'</js> is added to any nodes.
107    * </ul>
108    *
109    * <ul class='values'>
110    *    <li><js>"true"</js>
111    *    <li><js>"false"</js> (default)
112    * </ul>
113    *
114    * <h5 class='section'>Notes:</h5><ul>
115    *    <li class='note'>
116    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
117    * </ul>
118    *
119    * <h5 class='section'>See Also:</h5><ul>
120    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addBeanTypes()}
121    * </ul>
122    *
123    * @return The annotation value.
124    */
125   String addBeanTypes() default "";
126
127   /**
128    * Add type attribute to root nodes.
129    *
130    * <p>
131    * When disabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level
132    * type information that might normally be included to determine the data type will not be serialized.
133    *
134    * <p>
135    * For example, when serializing a top-level POJO with a {@link Bean#typeName() @Bean(typeName)} value, a
136    * <js>'_type'</js> attribute will only be added when this setting is enabled.
137    *
138    * <p>
139    * Note the differences between the following settings:
140    * <ul>
141    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addRootType()} - Affects whether <js>'_type'</js> is added to root node.
142    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addBeanTypes()} - Affects whether <js>'_type'</js> is added to any nodes.
143    * </ul>
144    *
145    * <ul class='values'>
146    *    <li><js>"true"</js>
147    *    <li><js>"false"</js> (default)
148    * </ul>
149    *
150    * <h5 class='section'>Notes:</h5><ul>
151    *    <li class='note'>
152    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
153    * </ul>
154    *
155    * <h5 class='section'>See Also:</h5><ul>
156    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addRootType()}
157    * </ul>
158    *
159    * @return The annotation value.
160    */
161   String addRootType() default "";
162
163   /**
164    * Don't trim null bean property values.
165    *
166    * <p>
167    * If <js>"true"</js>, null bean values will be serialized to the output.
168    *
169    * <p>
170    * Note that not enabling this setting has the following effects on parsing:
171    * <ul class='spaced-list'>
172    *    <li>
173    *       Map entries with <jk>null</jk> values will be lost.
174    * </ul>
175    *
176    * <ul class='values'>
177    *    <li><js>"true"</js>
178    *    <li><js>"false"</js> (default)
179    * </ul>
180    *
181    * <h5 class='section'>Notes:</h5><ul>
182    *    <li class='note'>
183    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
184    * </ul>
185    *
186    * <h5 class='section'>See Also:</h5><ul>
187    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#keepNullProperties()}
188    * </ul>
189    *
190    * @return The annotation value.
191    */
192   String keepNullProperties() default "";
193
194   /**
195    * Serializer listener.
196    *
197    * <p>
198    * Class used to listen for errors and warnings that occur during serialization.
199    *
200    * <h5 class='section'>See Also:</h5><ul>
201    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#listener(Class)}
202    * </ul>
203    *
204    * @return The annotation value.
205    */
206   Class<? extends SerializerListener> listener() default SerializerListener.Void.class;
207
208   /**
209    * Sort arrays and collections alphabetically.
210    *
211    * <p>
212    * Copies and sorts the contents of arrays and collections before serializing them.
213    *
214    * <p>
215    * Note that this introduces a performance penalty.
216    *
217    * <ul class='values'>
218    *    <li><js>"true"</js>
219    *    <li><js>"false"</js> (default)
220    * </ul>
221    *
222    * <h5 class='section'>Notes:</h5><ul>
223    *    <li class='note'>
224    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
225    * </ul>
226    *
227    * <h5 class='section'>See Also:</h5><ul>
228    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#sortCollections()}
229    * </ul>
230    *
231    * @return The annotation value.
232    */
233   String sortCollections() default "";
234
235   /**
236    * Sort maps alphabetically.
237    *
238    * <p>
239    * Copies and sorts the contents of maps by their keys before serializing them.
240    *
241    * <p>
242    * Note that this introduces a performance penalty.
243    *
244    * <ul class='values'>
245    *    <li><js>"true"</js>
246    *    <li><js>"false"</js> (default)
247    * </ul>
248    *
249    * <h5 class='section'>Notes:</h5><ul>
250    *    <li class='note'>
251    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
252    * </ul>
253    *
254    * <h5 class='section'>See Also:</h5><ul>
255    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#sortMaps()}
256    * </ul>
257    *
258    * @return The annotation value.
259    */
260   String sortMaps() default "";
261
262   /**
263    * Trim empty lists and arrays.
264    *
265    * <p>
266    * If <js>"true"</js>, empty lists and arrays will not be serialized.
267    *
268    * <p>
269    * Note that enabling this setting has the following effects on parsing:
270    * <ul class='spaced-list'>
271    *    <li>
272    *       Map entries with empty list values will be lost.
273    *    <li>
274    *       Bean properties with empty list values will not be set.
275    * </ul>
276    *
277    * <ul class='values'>
278    *    <li><js>"true"</js>
279    *    <li><js>"false"</js> (default)
280    * </ul>
281    *
282    * <h5 class='section'>Notes:</h5><ul>
283    *    <li class='note'>
284    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
285    * </ul>
286    *
287    * <h5 class='section'>See Also:</h5><ul>
288    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#trimEmptyCollections()}
289    * </ul>
290    *
291    * @return The annotation value.
292    */
293   String trimEmptyCollections() default "";
294
295   /**
296    * Trim empty maps.
297    *
298    * <p>
299    * If <js>"true"</js>, empty map values will not be serialized to the output.
300    *
301    * <p>
302    * Note that enabling this setting has the following effects on parsing:
303    * <ul class='spaced-list'>
304    *    <li>
305    *       Bean properties with empty map values will not be set.
306    * </ul>
307    *
308    * <ul class='values'>
309    *    <li><js>"true"</js>
310    *    <li><js>"false"</js> (default)
311    * </ul>
312    *
313    * <h5 class='section'>Notes:</h5><ul>
314    *    <li class='note'>
315    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
316    * </ul>
317    *
318    * <h5 class='section'>See Also:</h5><ul>
319    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#trimEmptyMaps()}
320    * </ul>
321    *
322    * @return The annotation value.
323    */
324   String trimEmptyMaps() default "";
325
326   /**
327    * Trim strings.
328    *
329    * <p>
330    * If <js>"true"</js>, string values will be trimmed of whitespace using {@link String#trim()} before being serialized.
331    *
332    * <ul class='values'>
333    *    <li><js>"true"</js>
334    *    <li><js>"false"</js> (default)
335    * </ul>
336    *
337    * <h5 class='section'>Notes:</h5><ul>
338    *    <li class='note'>
339    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
340    * </ul>
341    *
342    * <h5 class='section'>See Also:</h5><ul>
343    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#trimStrings()}
344    * </ul>
345    *
346    * @return The annotation value.
347    */
348   String trimStrings() default "";
349
350   /**
351    * URI context bean.
352    *
353    * <h5 class='section'>Description:</h5>
354    * <p>
355    * Bean used for resolution of URIs to absolute or root-relative form.
356    *
357    * <h5 class='section'>Notes:</h5><ul>
358    *    <li class='note'>
359    *       Format: JSON object representing a {@link UriContext}
360    *    <li class='note'>
361    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
362    * </ul>
363    *
364    * <h5 class='section'>See Also:</h5><ul>
365    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#uriContext(UriContext)}
366    * </ul>
367    *
368    * @return The annotation value.
369    */
370   String uriContext() default "";
371
372   /**
373    * URI relativity.
374    *
375    * <p>
376    * Defines what relative URIs are relative to when serializing any of the following:
377    * <ul>
378    *    <li>{@link java.net.URI}
379    *    <li>{@link java.net.URL}
380    *    <li>Properties and classes annotated with {@link Uri @Uri}
381    * </ul>
382    *
383    * <ul class='values'>
384    *    <li><js>"RESOURCE"</js> (default) - Relative URIs should be considered relative to the servlet URI.
385    *    <li><js>"PATH_INFO"</js> - Relative URIs should be considered relative to the request URI.
386    * </ul>
387    *
388    * <h5 class='section'>Notes:</h5><ul>
389    *    <li class='note'>
390    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
391    * </ul>
392    *
393    * <h5 class='section'>See Also:</h5><ul>
394    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#uriRelativity(UriRelativity)}
395    *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshallingUris">URIs</a>
396    * </ul>
397    *
398    * @return The annotation value.
399    */
400   String uriRelativity() default "";
401
402   /**
403    * URI resolution.
404    *
405    * <p>
406    * Defines the resolution level for URIs when serializing any of the following:
407    * <ul>
408    *    <li>{@link java.net.URI}
409    *    <li>{@link java.net.URL}
410    *    <li>Properties and classes annotated with {@link Uri @Uri}
411    * </ul>
412    *
413    * <ul class='values'>
414    *    <li><js>"ABSOLUTE"</js> - Resolve to an absolute URL (e.g. <js>"http://host:port/context-root/servlet-path/path-info"</js>).
415    *    <li><js>"ROOT_RELATIVE"</js> - Resolve to a root-relative URL (e.g. <js>"/context-root/servlet-path/path-info"</js>).
416    *    <li><js>"NONE"</js> (default) - Don't do any URL resolution.
417    * </ul>
418    *
419    * <h5 class='section'>Notes:</h5><ul>
420    *    <li class='note'>
421    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
422    * </ul>
423    *
424    * <h5 class='section'>See Also:</h5><ul>
425    *    <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#uriResolution(UriResolution)}
426    *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshallingUris">URIs</a>
427    * </ul>
428    *
429    * @return The annotation value.
430    */
431   String uriResolution() default "";
432
433   //-------------------------------------------------------------------------------------------------------------------
434   // WriterSerializer
435   //-------------------------------------------------------------------------------------------------------------------
436
437   /**
438    * File charset.
439    *
440    * <p>
441    * The character set to use for writing Files to the file system.
442    *
443    * <p>
444    * Used when passing in files to {@link Serializer#serialize(Object, Object)}.
445    *
446    * <h5 class='section'>Notes:</h5><ul>
447    *    <li class='note'>
448    *       Format: string
449    *    <li class='note'>
450    *       "DEFAULT" can be used to indicate the JVM default file system charset.
451    *    <li class='note'>
452    *       Default: JVM system default.
453    *    <li class='note'>
454    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
455    *    <li class='note'>
456    *       This setting does not apply to the RDF serializers.
457    * </ul>
458    *
459    * <h5 class='section'>See Also:</h5><ul>
460    *    <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#fileCharset(java.nio.charset.Charset)}
461    * </ul>
462    *
463    * @return The annotation value.
464    */
465   String fileCharset() default "";
466
467   /**
468    * Maximum indentation.
469    *
470    * <p>
471    * Specifies the maximum indentation level in the serialized document.
472    *
473    * <h5 class='section'>Notes:</h5><ul>
474    *    <li class='note'>
475    *       Format: integer
476    *    <li class='note'>
477    *       Default: 100
478    *    <li class='note'>
479    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
480    *    <li class='note'>
481    *       This setting does not apply to the RDF serializers.
482    * </ul>
483    *
484    * <h5 class='section'>See Also:</h5><ul>
485    *    <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#maxIndent(int)}
486    * </ul>
487    *
488    * @return The annotation value.
489    */
490   String maxIndent() default "";
491
492   /**
493    * Quote character.
494    *
495    * <p>
496    * This is the character used for quoting attributes and values.
497    *
498    * <h5 class='section'>Notes:</h5><ul>
499    *    <li class='note'>
500    *       Default: <c>"</c>
501    *    <li class='note'>
502    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
503    *    <li class='note'>
504    *       This setting does not apply to the RDF serializers.
505    * </ul>
506    *
507    * <h5 class='section'>See Also:</h5><ul>
508    *    <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#quoteChar(char)}
509    * </ul>
510    *
511    * @return The annotation value.
512    */
513   String quoteChar() default "";
514
515   /**
516    * Output stream charset.
517    *
518    * <p>
519    * The character set to use when writing to OutputStreams.
520    *
521    * <p>
522    * Used when passing in output streams and byte arrays to {@link WriterSerializer#serialize(Object, Object)}.
523    *
524    * <h5 class='section'>Notes:</h5><ul>
525    *    <li class='note'>
526    *       Format: string
527    *    <li class='note'>
528    *       Default: <js>"utf-8"</js>.
529    *    <li class='note'>
530    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
531    *    <li class='note'>
532    *       This setting does not apply to the RDF serializers.
533    * </ul>
534    *
535    * <h5 class='section'>See Also:</h5><ul>
536    *    <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#streamCharset(Charset)}
537    * </ul>
538    *
539    * @return The annotation value.
540    */
541   String streamCharset() default "";
542
543   /**
544    * Use whitespace.
545    *
546    * <p>
547    * If <js>"true"</js>, whitespace is added to the output to improve readability.
548    *
549    * <ul class='values'>
550    *    <li><js>"true"</js>
551    *    <li><js>"false"</js> (default)
552    * </ul>
553    *
554    * <h5 class='section'>Notes:</h5><ul>
555    *    <li class='note'>
556    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
557    * </ul>
558    *
559    * <h5 class='section'>See Also:</h5><ul>
560    *    <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#useWhitespace()}
561    * </ul>
562    *
563    * @return The annotation value.
564    */
565   String useWhitespace() default "";
566
567   //-----------------------------------------------------------------------------------------------------------------
568   // BeanTraverseContext
569   //-----------------------------------------------------------------------------------------------------------------
570
571   /**
572    * Automatically detect POJO recursions.
573    *
574    * <p>
575    * Specifies that recursions should be checked for during traversal.
576    *
577    * <p>
578    * Recursions can occur when traversing models that aren't true trees but rather contain loops.
579    * <br>In general, unchecked recursions cause stack-overflow-errors.
580    * <br>These show up as {@link ParseException ParseExceptions} with the message <js>"Depth too deep.  Stack overflow occurred."</js>.
581    *
582    * <p>
583    * The behavior when recursions are detected depends on the value for {@link org.apache.juneau.BeanTraverseContext.Builder#ignoreRecursions()}.
584    *
585    * <p>
586    * For example, if a model contains the links A-&gt;B-&gt;C-&gt;A, then the JSON generated will look like
587    *    the following when <jsf>BEANTRAVERSE_ignoreRecursions</jsf> is <jk>true</jk>...
588    *
589    * <p class='bjson'>
590    *    {A:{B:{C:<jk>null</jk>}}}
591    * </p>
592    *
593    * <ul class='values'>
594    *    <li><js>"true"</js>
595    *    <li><js>"false"</js> (default)
596    * </ul>
597    *
598    * <h5 class='section'>Notes:</h5><ul>
599    *    <li class='warn'>
600    *       Checking for recursion can cause a small performance penalty.
601    *    <li class='note'>
602    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
603    * </ul>
604    *
605    * <h5 class='section'>See Also:</h5><ul>
606    *    <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()}
607    * </ul>
608    *
609    * @return The annotation value.
610    */
611   String detectRecursions() default "";
612
613   /**
614    * Ignore recursion errors.
615    *
616    * <p>
617    * Used in conjunction with {@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()}.
618    * <br>Setting is ignored if <jsf>BEANTRAVERSE_detectRecursions</jsf> is <js>"false"</js>.
619    *
620    * <p>
621    * If <js>"true"</js>, when we encounter the same object when traversing a tree, we set the value to <jk>null</jk>.
622    * <br>Otherwise, a {@link BeanRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>.
623    *
624    * <ul class='values'>
625    *    <li><js>"true"</js>
626    *    <li><js>"false"</js> (default)
627    * </ul>
628    *
629    * <h5 class='section'>Notes:</h5><ul>
630    *    <li class='note'>
631    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
632    * </ul>
633    *
634    * <h5 class='section'>See Also:</h5><ul>
635    *    <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#ignoreRecursions()}
636    * </ul>
637    *
638    * @return The annotation value.
639    */
640   String ignoreRecursions() default "";
641
642   /**
643    * Initial depth.
644    *
645    * <p>
646    * The initial indentation level at the root.
647    * <br>Useful when constructing document fragments that need to be indented at a certain level.
648    *
649    * <h5 class='section'>Notes:</h5><ul>
650    *    <li class='note'>
651    *       Format: integer
652    * <li class='note'>
653    *       Default value: <js>"0"</js>
654    *    <li class='note'>
655    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
656    * </ul>
657    *
658    * <h5 class='section'>See Also:</h5><ul>
659    *    <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#initialDepth(int)}
660    * </ul>
661    *
662    * @return The annotation value.
663    */
664   String initialDepth() default "";
665
666   /**
667    * Max traversal depth.
668    *
669    * <p>
670    * Abort traversal if specified depth is reached in the POJO tree.
671    * <br>If this depth is exceeded, an exception is thrown.
672    *
673    * <h5 class='section'>Notes:</h5><ul>
674    *    <li class='note'>
675    *       Format: integer
676    *    <li class='note'>
677    *       Default value: <js>"100"</js>
678    *    <li class='note'>
679    *       Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
680    * </ul>
681    *
682    * <h5 class='section'>See Also:</h5><ul>
683    *    <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#maxDepth(int)}
684    * </ul>
685    *
686    * @return The annotation value.
687    */
688   String maxDepth() default "";
689}