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