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.annotation; 014 015import static java.lang.annotation.ElementType.*; 016import static java.lang.annotation.RetentionPolicy.*; 017 018import java.io.*; 019import java.lang.annotation.*; 020import java.lang.reflect.*; 021 022import org.apache.juneau.*; 023import org.apache.juneau.parser.*; 024import org.apache.juneau.serializer.*; 025import org.apache.juneau.transform.*; 026 027/** 028 * Annotation for specifying config properties defined in {@link BeanContext} and {@link BeanTraverseContext}. 029 * 030 * <p> 031 * Used primarily for specifying bean configuration properties on REST classes and methods. 032 */ 033@Documented 034@Target({TYPE,METHOD}) 035@Retention(RUNTIME) 036@Inherited 037@PropertyStoreApply(BeanConfigApply.class) 038public @interface BeanConfig { 039 040 /** 041 * Optional rank for this config. 042 * 043 * <p> 044 * Can be used to override default ordering and application of config annotations. 045 */ 046 int rank() default 0; 047 048 //----------------------------------------------------------------------------------------------------------------- 049 // BeanContext 050 //----------------------------------------------------------------------------------------------------------------- 051 052 /** 053 * Configuration property: Minimum bean class visibility. 054 * 055 * <p> 056 * Classes are not considered beans unless they meet the minimum visibility requirements. 057 * 058 * <p> 059 * For example, if the visibility is <c>PUBLIC</c> and the bean class is <jk>protected</jk>, then the class 060 * will not be interpreted as a bean class and be serialized as a string. 061 * <br>Use this setting to reduce the visibility requirement. 062 * 063 * <ul class='notes'> 064 * <li> 065 * Possible values: 066 * <ul> 067 * <li><js>"PUBLIC"</js> (default) 068 * <li><js>"PROTECTED"</js> 069 * <li><js>"DEFAULT"</js> 070 * <li><js>"PRIVATE"</js> 071 * </ul> 072 * <li> 073 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 074 * <li> 075 * A default global value can be set via the system property <js>"BeanContext.beanClassVisibility.s"</js>. 076 * </ul> 077 * 078 * <ul class='seealso'> 079 * <li class='jf'>{@link BeanContext#BEAN_beanClassVisibility} 080 * </ul> 081 */ 082 String beanClassVisibility() default ""; 083 084 /** 085 * Configuration property: Minimum bean constructor visibility. 086 * 087 * <p> 088 * Only look for constructors with the specified minimum visibility. 089 * 090 * <p> 091 * This setting affects the logic for finding no-arg constructors for bean. 092 * <br>Normally, only <jk>public</jk> no-arg constructors are used. 093 * <br>Use this setting if you want to reduce the visibility requirement. 094 * 095 * <ul class='notes'> 096 * <li> 097 * Possible values: 098 * <ul> 099 * <li><js>"PUBLIC"</js> (default) 100 * <li><js>"PROTECTED"</js> 101 * <li><js>"DEFAULT"</js> 102 * <li><js>"PRIVATE"</js> 103 * </ul> 104 * <li> 105 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 106 * <li> 107 * A default global value can be set via the system property <js>"BeanContext.beanConstructorVisibility.s"</js>. 108 * </ul> 109 * 110 * <ul class='seealso'> 111 * <li class='jf'>{@link BeanContext#BEAN_beanConstructorVisibility} 112 * </ul> 113 */ 114 String beanConstructorVisibility() default ""; 115 116 /** 117 * Configuration property: Bean dictionary. 118 * 119 * <p> 120 * The list of classes that make up the bean dictionary in this bean context. 121 * 122 * <p> 123 * A dictionary is a name/class mapping used to find class types during parsing when they cannot be inferred 124 * through reflection. 125 * <br>The names are defined through the {@link Bean#typeName() @Bean(typeName)} annotation defined on the bean class. 126 * <br>For example, if a class <c>Foo</c> has a type-name of <js>"myfoo"</js>, then it would end up serialized 127 * as <js>"{_type:'myfoo',...}"</js>. 128 * 129 * <p> 130 * This setting tells the parsers which classes to look for when resolving <js>"_type"</js> attributes. 131 * 132 * <ul class='seealso'> 133 * <li class='jf'>{@link BeanContext#BEAN_beanDictionary} 134 * <li class='link'>{@doc juneau-marshall.BeanDictionaries} 135 * </ul> 136 */ 137 Class<?>[] beanDictionary() default {}; 138 139 /** 140 * Configuration property: Add to bean dictionary. 141 * 142 * <ul class='seealso'> 143 * <li class='jf'>{@link BeanContext#BEAN_beanDictionary} 144 * </ul> 145 */ 146 Class<?>[] beanDictionary_replace() default {}; 147 148 /** 149 * Configuration property: Remove from bean dictionary. 150 * 151 * <ul class='seealso'> 152 * <li class='jf'>{@link BeanContext#BEAN_beanDictionary_remove} 153 * </ul> 154 */ 155 Class<?>[] beanDictionary_remove() default {}; 156 157 /** 158 * Configuration property: Minimum bean field visibility. 159 * 160 * <p> 161 * Only look for bean fields with the specified minimum visibility. 162 * 163 * <p> 164 * This affects which fields on a bean class are considered bean properties. 165 * <br>Normally only <jk>public</jk> fields are considered. 166 * <br>Use this setting if you want to reduce the visibility requirement. 167 * 168 * <ul class='notes'> 169 * <li> 170 * Possible values: 171 * <ul> 172 * <li><js>"PUBLIC"</js> (default) 173 * <li><js>"PROTECTED"</js> 174 * <li><js>"DEFAULT"</js> 175 * <li><js>"PRIVATE"</js> 176 * </ul> 177 * <li> 178 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 179 * <li> 180 * A default global value can be set via the system property <js>"BeanContext.beanFieldVisibility.s"</js>. 181 * </ul> 182 * 183 * <ul class='seealso'> 184 * <li class='jf'>{@link BeanContext#BEAN_beanFieldVisibility} 185 * </ul> 186 */ 187 String beanFieldVisibility() default ""; 188 189 /** 190 * Configuration property: Bean filters. 191 * 192 * <p> 193 * This is a programmatic equivalent to the {@link Bean @Bean} annotation. 194 * <br>It's useful when you want to use the <c>@Bean</c> annotation functionality, but you don't have the ability to alter 195 * the bean classes. 196 * 197 * <ul class='notes'> 198 * <li> 199 * Values can consist of any of the following types: 200 * <ul class='spaced-list'> 201 * <li>Any subclass of {@link BeanFilterBuilder}. 202 * <br>These must have a public no-arg constructor. 203 * <li>Any bean interfaces. 204 * <br>A shortcut for defining a {@link InterfaceBeanFilterBuilder}. 205 * <br>Any subclasses of an interface class will only have properties defined on the interface. 206 * <br>All other bean properties will be ignored. 207 * </ul> 208 * </ul> 209 * 210 * <ul class='seealso'> 211 * <li class='jf'>{@link BeanContext#BEAN_beanFilters} 212 * <li class='link'>{@doc juneau-marshall.Transforms.BeanFilters} 213 * <li class='link'>{@doc juneau-marshall.Transforms.InterfaceFilters} 214 * </ul> 215 */ 216 Class<?>[] beanFilters() default {}; 217 218 /** 219 * Configuration property: Add to bean filters. 220 * 221 * <ul class='seealso'> 222 * <li class='jf'>{@link BeanContext#BEAN_beanFilters} 223 * </ul> 224 */ 225 Class<?>[] beanFilters_replace() default {}; 226 227 /** 228 * Configuration property: Remove from bean filters. 229 * 230 * <ul class='seealso'> 231 * <li class='jf'>{@link BeanContext#BEAN_beanFilters_remove} 232 * </ul> 233 */ 234 Class<?>[] beanFilters_remove() default {}; 235 236 /** 237 * Configuration property: BeanMap.put() returns old property value. 238 * 239 * <p> 240 * If <js>"true"</js>, then the {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property 241 * values. 242 * <br>Otherwise, it returns <jk>null</jk>. 243 * 244 * <ul class='notes'> 245 * <li> 246 * Possible values: 247 * <ul> 248 * <li><js>"true"</js> 249 * <li><js>"false"</js> (default because it introduces a slight performance penalty during serialization) 250 * </ul> 251 * <li> 252 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 253 * <li> 254 * A default global value can be set via the system property <js>"BeanContext.beanMapPutReturnsOldValue.b"</js>. 255 * </ul> 256 * 257 * <ul class='seealso'> 258 * <li class='jf'>{@link BeanContext#BEAN_beanMapPutReturnsOldValue} 259 * </ul> 260 */ 261 String beanMapPutReturnsOldValue() default ""; 262 263 /** 264 * Configuration property: Minimum bean method visibility. 265 * 266 * <p> 267 * Only look for bean methods with the specified minimum visibility. 268 * 269 * <p> 270 * This affects which methods are detected as getters and setters on a bean class. 271 * <br>Normally only <jk>public</jk> getters and setters are considered. 272 * <br>Use this setting if you want to reduce the visibility requirement. 273 * 274 * <ul class='notes'> 275 * <li> 276 * Possible values: 277 * <ul> 278 * <li><js>"PUBLIC"</js> (default) 279 * <li><js>"PROTECTED"</js> 280 * <li><js>"DEFAULT"</js> 281 * <li><js>"PRIVATE"</js> 282 * </ul> 283 * <li> 284 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 285 * <li> 286 * A default global value can be set via the system property <js>"BeanContext.beanMethodVisibility.s"</js>. 287 * </ul> 288 * 289 * <ul class='seealso'> 290 * <li class='jf'>{@link BeanContext#BEAN_beanMethodVisibility} 291 * </ul> 292 */ 293 String beanMethodVisibility() default ""; 294 295 /** 296 * Configuration property: Beans require no-arg constructors. 297 * 298 * <p> 299 * If <js>"true"</js>, a Java class must implement a default no-arg constructor to be considered a bean. 300 * <br>Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method. 301 * 302 * <ul class='notes'> 303 * <li> 304 * Possible values: 305 * <ul> 306 * <li><js>"true"</js> 307 * <li><js>"false"</js> (default) 308 * </ul> 309 * <li> 310 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 311 * <li> 312 * The {@link Bean @Bean} annotation can be used on a class to override this setting when <js>"true"</js>. 313 * <li> 314 * A default global value can be set via the system property <js>"BeanContext.beansRequireDefaultConstructor.b"</js>. 315 * </ul> 316 * 317 * <ul class='seealso'> 318 * <li class='jf'>{@link BeanContext#BEAN_beansRequireDefaultConstructor} 319 * </ul> 320 */ 321 String beansRequireDefaultConstructor() default ""; 322 323 /** 324 * Configuration property: Beans require Serializable interface. 325 * 326 * <p> 327 * If <js>"true"</js>, a Java class must implement the {@link Serializable} interface to be considered a bean. 328 * <br>Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method. 329 * 330 * <ul class='notes'> 331 * <li> 332 * Possible values: 333 * <ul> 334 * <li><js>"true"</js> 335 * <li><js>"false"</js> (default) 336 * </ul> 337 * <li> 338 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 339 * <li> 340 * The {@link Bean @Bean} annotation can be used on a class to override this setting when <js>"true"</js>. 341 * <li> 342 * A default global value can be set via the system property <js>"BeanContext.beansRequireSerializable.b"</js>. 343 * </ul> 344 * 345 * <ul class='seealso'> 346 * <li class='jf'>{@link BeanContext#BEAN_beansRequireSerializable} 347 * </ul> 348 */ 349 String beansRequireSerializable() default ""; 350 351 /** 352 * Configuration property: Beans require setters for getters. 353 * 354 * <p> 355 * If <js>"true"</js>, only getters that have equivalent setters will be considered as properties on a bean. 356 * <br>Otherwise, they will be ignored. 357 * 358 * <ul class='notes'> 359 * <li> 360 * Possible values: 361 * <ul> 362 * <li><js>"true"</js> 363 * <li><js>"false"</js> (default) 364 * </ul> 365 * <li> 366 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 367 * <li> 368 * A default global value can be set via the system property <js>"BeanContext.beansRequireSettersForGetters.b"</js>. 369 * </ul> 370 * 371 * <ul class='seealso'> 372 * <li class='jf'>{@link BeanContext#BEAN_beansRequireSettersForGetters} 373 * </ul> 374 */ 375 String beansRequireSettersForGetters() default ""; 376 377 /** 378 * Configuration property: Beans require at least one property. 379 * 380 * <p> 381 * If <js>"true"</js>, then a Java class must contain at least 1 property to be considered a bean. 382 * <br>Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method. 383 * 384 * <ul class='notes'> 385 * <li> 386 * Possible values: 387 * <ul> 388 * <li><js>"true"</js> (default) 389 * <li><js>"false"</js> 390 * </ul> 391 * <li> 392 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 393 * <li> 394 * A default global value can be set via the system property <js>"BeanContext.beansRequireSomeProperties.b"</js>. 395 * </ul> 396 * 397 * <ul class='seealso'> 398 * <li class='jf'>{@link BeanContext#BEAN_beansRequireSomeProperties} 399 * </ul> 400 */ 401 String beansRequireSomeProperties() default ""; 402 403 /** 404 * Configuration property: Bean type property name. 405 * 406 * <p> 407 * This specifies the name of the bean property used to store the dictionary name of a bean type so that the 408 * parser knows the data type to reconstruct. 409 * 410 * <ul class='notes'> 411 * <li> 412 * Default value: <js>"_type"</js>. 413 * <li> 414 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 415 * <li> 416 * A default global value can be set via the system property <js>"BeanContext.beanTypePropertyName.s"</js>. 417 * </ul> 418 419 * <ul class='seealso'> 420 * <li class='jf'>{@link BeanContext#BEAN_beanTypePropertyName} 421 * </ul> 422 */ 423 String beanTypePropertyName() default ""; 424 425 /** 426 * Configuration property: Bean property includes. 427 * 428 * Shortcut for specifying the {@link BeanContext#BEAN_includeProperties} property on all serializers. 429 * 430 * <p> 431 * The typical use case is when you're rendering summary and details views of the same bean in a resource and 432 * you want to expose or hide specific properties depending on the level of detail you want. 433 * 434 * <p> 435 * In the example below, our 'summary' view is a list of beans where we only want to show the ID property, 436 * and our detail view is a single bean where we want to expose different fields: 437 * <p class='bcode w800'> 438 * <jc>// Our bean</jc> 439 * <jk>public class</jk> MyBean { 440 * 441 * <jc>// Summary properties</jc> 442 * <ja>@Html</ja>(link=<js>"servlet:/mybeans/{id}"</js>) 443 * <jk>public</jk> String <jf>id</jf>; 444 * 445 * <jc>// Detail properties</jc> 446 * <jk>public</jk> String <jf>a</jf>, <jf>b</jf>; 447 * } 448 * 449 * <jc>// Only render "id" property.</jc> 450 * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/mybeans"</js>) 451 * <ja>@BeanConfig</ja>(bpi=<js>"MyBean: id"</js>) 452 * <jk>public</jk> List<MyBean> getBeanSummary() {...} 453 * 454 * <jc>// Only render "a" and "b" properties.</jc> 455 * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/mybeans/{id}"</js>) 456 * <ja>@BeanConfig</ja>(bpi=<js>"MyBean: a,b"</js>) 457 * <jk>public</jk> MyBean getBeanDetails(<ja>@Path</ja> String id) {...} 458 * </p> 459 * 460 * <ul class='notes'> 461 * <li> 462 * The format of each value is: <js>"Key: comma-delimited-tokens"</js>. 463 * <li> 464 * Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes. 465 * <li> 466 * Values are comma-delimited lists of bean property names. 467 * <li> 468 * Properties apply to specified class and all subclasses. 469 * <li> 470 * Semicolons can be used as an additional separator for multiple values: 471 * <p class='bcode w800'> 472 * <jc>// Equivalent</jc> 473 * bpi={<js>"Bean1: foo"</js>,<js>"Bean2: bar,baz"</js>} 474 * bpi=<js>"Bean1: foo; Bean2: bar,baz"</js> 475 * </p> 476 * <li> 477 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 478 * <li> 479 * A default global value can be set via the system property <js>"BeanContext.properties.sms"</js>. 480 * </ul> 481 * 482 * <ul class='seealso'> 483 * <li class='jf'>{@link BeanContext#BEAN_includeProperties} 484 * </ul> 485 */ 486 String[] bpi() default {}; 487 488 /** 489 * Configuration property: Bean property excludes. 490 * 491 * Shortcut for specifying the {@link BeanContext#BEAN_excludeProperties} property on all serializers. 492 * 493 * <p> 494 * Same as {@link #bpi()} except you specify a list of bean property names that you want to exclude from 495 * serialization. 496 * 497 * <p> 498 * In the example below, our 'summary' view is a list of beans where we want to exclude some properties: 499 * <p class='bcode w800'> 500 * <jc>// Our bean</jc> 501 * <jk>public class</jk> MyBean { 502 * 503 * <jc>// Summary properties</jc> 504 * <ja>@Html</ja>(link=<js>"servlet:/mybeans/{id}"</js>) 505 * <jk>public</jk> String <jf>id</jf>; 506 * 507 * <jc>// Detail properties</jc> 508 * <jk>public</jk> String <jf>a</jf>, <jf>b</jf>; 509 * } 510 * 511 * <jc>// Don't show "a" and "b" properties.</jc> 512 * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/mybeans"</js>) 513 * <ja>@BeanConfig</ja>(bpx=<js>"MyBean: a,b"</js>) 514 * <jk>public</jk> List<MyBean> getBeanSummary() {...} 515 * 516 * <jc>// Render all properties.</jc> 517 * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/mybeans/{id}"</js>) 518 * <jk>public</jk> MyBean getBeanDetails(<ja>@Path</ja> String id) {...} 519 * </p> 520 * 521 * <ul class=''> 522 * <li> 523 * The format of each value is: <js>"Key: comma-delimited-tokens"</js>. 524 * <li> 525 * Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes. 526 * <li> 527 * Values are comma-delimited lists of bean property names. 528 * <li> 529 * Properties apply to specified class and all subclasses. 530 * <li> 531 * Semicolons can be used as an additional separator for multiple values: 532 * <p class='bcode w800'> 533 * <jc>// Equivalent</jc> 534 * bpx={<js>"Bean1: foo"</js>,<js>"Bean2: bar,baz"</js>} 535 * bpx=<js>"Bean1: foo; Bean2: bar,baz"</js> 536 * </p> 537 * <li> 538 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 539 * <li> 540 * A default global value can be set via the system property <js>"BeanContext.excludeProperties.sms"</js>. 541 * </ul> 542 * 543 * <ul class='seealso'> 544 * <li class='jf'>{@link BeanContext#BEAN_excludeProperties} 545 * </ul> 546 */ 547 String[] bpx() default {}; 548 549 /** 550 * Configuration property: Debug mode. 551 * 552 * <p> 553 * Enables the following additional information during serialization: 554 * <ul class='spaced-list'> 555 * <li> 556 * When bean getters throws exceptions, the exception includes the object stack information 557 * in order to determine how that method was invoked. 558 * <li> 559 * Enables {@link Serializer#BEANTRAVERSE_detectRecursions}. 560 * </ul> 561 * 562 * <p> 563 * Enables the following additional information during parsing: 564 * <ul class='spaced-list'> 565 * <li> 566 * When bean setters throws exceptions, the exception includes the object stack information 567 * in order to determine how that method was invoked. 568 * </ul> 569 * 570 * <ul class='notes'> 571 * <li> 572 * Possible values: 573 * <ul> 574 * <li><js>"true"</js> 575 * <li><js>"false"</js> (default) 576 * </ul> 577 * <li> 578 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 579 * <li> 580 * A default global value can be set via the system property <js>"BeanContext.debug.b"</js>. 581 * </ul> 582 * 583 * <ul class='seealso'> 584 * <li class='jf'>{@link BeanContext#BEAN_debug} 585 * </ul> 586 */ 587 String debug() default ""; 588 589 /** 590 * Configuration property: POJO examples. 591 * 592 * <p> 593 * Specifies an example of the specified class. 594 * 595 * <p> 596 * Examples are used in cases such as POJO examples in Swagger documents. 597 * 598 * <h5 class='section'>Example:</h5> 599 * <p class='bcode w800'> 600 * <ja>@BeanConfig</ja>( 601 * examples={ 602 * <ja>@CSEntry</ja>(key=MyBean.<jk>class</jk>, value=<js>"{foo:'bar'}"</js>) 603 * } 604 * ) 605 * </p> 606 * 607 * <ul class='notes'> 608 * <li> 609 * Setting applies to specified class and all subclasses. 610 * <li> 611 * Keys are the class of the example. 612 * <br>Values are Simple-JSON representation of that class. 613 * <li> 614 * POJO examples can also be defined on classes via the following: 615 * <ul class='spaced-list'> 616 * <li>A static field annotated with {@link Example @Example}. 617 * <li>A static method annotated with {@link Example @Example} with zero arguments or one {@link BeanSession} argument. 618 * <li>A static method with name <c>example</c> with no arguments or one {@link BeanSession} argument. 619 * </ul> 620 * <li> 621 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 622 * <li> 623 * A default global value can be set via the system property <js>"BeanContext.examples.smo"</js>. 624 * </ul> 625 * 626 * <ul class='seealso'> 627 * <li class='jf'>{@link BeanContext#BEAN_examples} 628 * </ul> 629 */ 630 CS[] example() default {}; 631 632 /** 633 * Configuration property: POJO examples. 634 * 635 * <p> 636 * Same as {@link #example()} but allows you to define examples as a Simple-JSON string. 637 * 638 * <h5 class='section'>Example:</h5> 639 * <p class='bcode w800'> 640 * <ja>@BeanConfig</ja>( 641 * examples={ 642 * <js>"MyBean: {foo:'bar'}"</js> <jc>// Could also be "{MyBean: {foo:'bar'}}"</jc> 643 * } 644 * ) 645 * </p> 646 * 647 * <ul class='notes'> 648 * <li> 649 * Keys are the class of the example and can be the fully-qualified name or simple name. 650 * <br>Values are Simple-JSON representation of that class. 651 * <li> 652 * The individual strings are concatenated together and the whole string is treated as a JSON Object. 653 * <br>The leading and trailing <js>'{'</js> and <js>'}'</js> characters are optional. 654 * <li> 655 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 656 * <li> 657 * A default global value can be set via the system property <js>"BeanContext.examples.smo"</js>. 658 * </ul> 659 * 660 * <ul class='seealso'> 661 * <li class='jf'>{@link BeanContext#BEAN_examples} 662 * </ul> 663 */ 664 String[] examples() default {}; 665 666 /** 667 * Configuration property: Bean property excludes. 668 * 669 * <p> 670 * Specifies to exclude the specified list of properties for the specified bean class. 671 * 672 * <h5 class='section'>Example:</h5> 673 * <p class='bcode w800'> 674 * <ja>@BeanConfig</ja>( 675 * excludeProperties={ 676 * <ja>@CSEntry</ja>(key=MyBean.<jk>class</jk>, value=<js>"foo,bar"</js>) 677 * } 678 * ) 679 * <p> 680 * 681 * <ul class='notes'> 682 * <li> 683 * Keys are the class applied to. 684 * <br>Values are comma-delimited lists of property names. 685 * <li> 686 * Setting applies to specified class and all subclasses. 687 * <li> 688 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 689 * <li> 690 * A default global value can be set via the system property <js>"BeanContext.excludeProperties.sms"</js>. 691 * </ul> 692 * 693 * <ul class='seealso'> 694 * <li class='jf'>{@link BeanContext#BEAN_excludeProperties} 695 * </ul> 696 */ 697 CS[] excludeProperties() default {}; 698 699 /** 700 * Configuration property: Find fluent setters. 701 * 702 * <p> 703 * When enabled, fluent setters are detected on beans. 704 * 705 * <p> 706 * Fluent setters must have the following attributes: 707 * <ul> 708 * <li>Public. 709 * <li>Not static. 710 * <li>Take in one parameter. 711 * <li>Return the bean itself. 712 * </ul> 713 * 714 * <ul class='notes'> 715 * <li> 716 * Possible values: 717 * <ul> 718 * <li><js>"true"</js> 719 * <li><js>"false"</js> (default) 720 * </ul> 721 * <li> 722 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 723 * <li> 724 * A default global value can be set via the system property <js>"BeanContext.fluentSetters.b"</js>. 725 * </ul> 726 * 727 * <ul class='seealso'> 728 * <li class='jf'>{@link BeanContext#BEAN_fluentSetters} 729 * </ul> 730 */ 731 String fluentSetters() default ""; 732 733 /** 734 * Configuration property: Ignore invocation errors on getters. 735 * 736 * <p> 737 * If <js>"true"</js>, errors thrown when calling bean getter methods will silently be ignored. 738 * <br>Otherwise, a {@code BeanRuntimeException} is thrown. 739 * 740 * <ul class='notes'> 741 * <li> 742 * Possible values: 743 * <ul> 744 * <li><js>"true"</js> 745 * <li><js>"false"</js> (default) 746 * </ul> 747 * <li> 748 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 749 * <li> 750 * A default global value can be set via the system property <js>"BeanContext.ignoreInvocationExceptionsOnGetters.b"</js>. 751 * </ul> 752 * 753 * <ul class='seealso'> 754 * <li class='jf'>{@link BeanContext#BEAN_ignoreInvocationExceptionsOnGetters} 755 * </ul> 756 */ 757 String ignoreInvocationExceptionsOnGetters() default ""; 758 759 /** 760 * Configuration property: Ignore invocation errors on setters. 761 * 762 * <p> 763 * If <js>"true"</js>, errors thrown when calling bean setter methods will silently be ignored. 764 * <br>Otherwise, a {@code BeanRuntimeException} is thrown. 765 * 766 * <ul class='notes'> 767 * <li> 768 * Possible values: 769 * <ul> 770 * <li><js>"true"</js> 771 * <li><js>"false"</js> (default) 772 * </ul> 773 * <li> 774 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 775 * <li> 776 * A default global value can be set via the system property <js>"BeanContext.ignoreInvocationExceptionsOnSetters.b"</js>. 777 * </ul> 778 * 779 * <ul class='seealso'> 780 * <li class='jf'>{@link BeanContext#BEAN_ignoreInvocationExceptionsOnSetters} 781 * </ul> 782 */ 783 String ignoreInvocationExceptionsOnSetters() default ""; 784 785 /** 786 * Configuration property: Ignore properties without setters. 787 * 788 * <p> 789 * If <js>"true"</js>, trying to set a value on a bean property without a setter will silently be ignored. 790 * <br>Otherwise, a {@code RuntimeException} is thrown. 791 * 792 * <ul class='notes'> 793 * <li> 794 * Possible values: 795 * <ul> 796 * <li><js>"true"</js> (default) 797 * <li><js>"false"</js> 798 * </ul> 799 * <li> 800 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 801 * <li> 802 * A default global value can be set via the system property <js>"BeanContext.ignorePropertiesWithoutSetters.b"</js>. 803 * </ul> 804 * 805 * <ul class='seealso'> 806 * <li class='jf'>{@link BeanContext#BEAN_ignorePropertiesWithoutSetters} 807 * </ul> 808 */ 809 String ignorePropertiesWithoutSetters() default ""; 810 811 /** 812 * Configuration property: Ignore unknown properties. 813 * 814 * <p> 815 * If <js>"true"</js>, trying to set a value on a non-existent bean property will silently be ignored. 816 * <br>Otherwise, a {@code RuntimeException} is thrown. 817 * 818 * <ul class='notes'> 819 * <li> 820 * Possible values: 821 * <ul> 822 * <li><js>"true"</js> 823 * <li><js>"false"</js> (default) 824 * </ul> 825 * <li> 826 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 827 * <li> 828 * A default global value can be set via the system property <js>"BeanContext.ignoreUnknownBeanProperties.b"</js>. 829 * </ul> 830 * 831 * <ul class='seealso'> 832 * <li class='jf'>{@link BeanContext#BEAN_ignoreUnknownBeanProperties} 833 * </ul> 834 */ 835 String ignoreUnknownBeanProperties() default ""; 836 837 /** 838 * Configuration property: Ignore unknown properties with null values. 839 * 840 * <p> 841 * If <js>"true"</js>, trying to set a <jk>null</jk> value on a non-existent bean property will silently be ignored. 842 * <br>Otherwise, a {@code RuntimeException} is thrown. 843 * 844 * <ul class='notes'> 845 * <li> 846 * Possible values: 847 * <ul> 848 * <li><js>"true"</js> (default) 849 * <li><js>"false"</js> 850 * </ul> 851 * <li> 852 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 853 * <li> 854 * A default global value can be set via the system property <js>"BeanContext.ignoreUnknownNullBeanProperties.b"</js>. 855 * </ul> 856 * 857 * <ul class='seealso'> 858 * <li class='jf'>{@link BeanContext#BEAN_ignoreUnknownNullBeanProperties} 859 * </ul> 860 */ 861 String ignoreUnknownNullBeanProperties() default ""; 862 863 /** 864 * Configuration property: Implementation classes. 865 * 866 * <p> 867 * For interfaces and abstract classes this method can be used to specify an implementation class for the 868 * interface/abstract class so that instances of the implementation class are used when instantiated (e.g. during a 869 * parse). 870 * 871 * <h5 class='section'>Example:</h5> 872 * <p class='bcode w800'> 873 * <ja>@BeanConfig</ja>( 874 * implClasses={ 875 * <ja>@CCEntry</ja>(key=MyInterface.<jk>class</jk>, value=MyInterfaceImpl.<jk>class</jk>) 876 * } 877 * ) 878 * <p> 879 * 880 * <ul class='seealso'> 881 * <li class='jf'>{@link BeanContext#BEAN_implClasses} 882 * </ul> 883 */ 884 CC[] implClasses() default {}; 885 886 /** 887 * Configuration property: Bean property includes. 888 * 889 * <p> 890 * Specifies the set and order of names of properties associated with the bean class. 891 * 892 * <h5 class='section'>Example:</h5> 893 * <p class='bcode w800'> 894 * <ja>@BeanConfig</ja>( 895 * includeProperties={ 896 * <ja>@CSEntry</ja>(key=MyBean.<jk>class</jk>, value=<js>"foo,bar"</js>) 897 * } 898 * ) 899 * <p> 900 * 901 * <ul class='notes'> 902 * <li> 903 * Keys are the class applied to. 904 * <br>Values are comma-delimited lists of property names. 905 * <li> 906 * Setting applies to specified class and all subclasses. 907 * <li> 908 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 909 * <li> 910 * A default global value can be set via the system property <js>"BeanContext.properties.sms"</js>. 911 * </ul> 912 * 913 * <ul class='seealso'> 914 * <li class='jf'>{@link BeanContext#BEAN_includeProperties} 915 * </ul> 916 */ 917 CS[] includeProperties() default {}; 918 919 /** 920 * Configuration property: Locale. 921 * 922 * <p> 923 * Specifies the default locale for serializer and parser sessions. 924 * 925 * <ul class='notes'> 926 * <li> 927 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 928 * <li> 929 * A default global value can be set via the system property <js>"BeanContext.locale.s"</js>. 930 * </ul> 931 * 932 * <ul class='seealso'> 933 * <li class='jf'>{@link BeanContext#BEAN_locale} 934 * </ul> 935 */ 936 String locale() default ""; 937 938 /** 939 * Configuration property: Media type. 940 * 941 * <p> 942 * Specifies the default media type value for serializer and parser sessions. 943 * 944 * <ul class='notes'> 945 * <li> 946 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 947 * <li> 948 * A default global value can be set via the system property <js>"BeanContext.mediaType.s"</js>. 949 * </ul> 950 * 951 * <ul class='seealso'> 952 * <li class='jf'>{@link BeanContext#BEAN_mediaType} 953 * </ul> 954 */ 955 String mediaType() default ""; 956 957 /** 958 * Configuration property: Bean class exclusions. 959 * 960 * <p> 961 * List of classes that should not be treated as beans even if they appear to be bean-like. 962 * <br>Not-bean classes are converted to <c>Strings</c> during serialization. 963 * 964 * <ul class='notes'> 965 * <li> 966 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 967 * <li> 968 * A default global value can be set via the system property <js>"BeanContext.notBeanClasses.sc"</js>. 969 * </ul> 970 * 971 * <ul class='seealso'> 972 * <li class='jf'>{@link BeanContext#BEAN_notBeanClasses} 973 * </ul> 974 */ 975 Class<?>[] notBeanClasses() default {}; 976 977 /** 978 * Configuration property: Add to classes that should not be considered beans. 979 * 980 * <ul class='seealso'> 981 * <li class='jf'>{@link BeanContext#BEAN_notBeanClasses} 982 * </ul> 983 */ 984 Class<?>[] notBeanClasses_replace() default {}; 985 986 /** 987 * Configuration property: Remove from classes that should not be considered beans. 988 * 989 * <ul class='seealso'> 990 * <li class='jf'>{@link BeanContext#BEAN_notBeanClasses} 991 * </ul> 992 */ 993 Class<?>[] notBeanClasses_remove() default {}; 994 995 /** 996 * Configuration property: Bean package exclusions. 997 * 998 * <p> 999 * When specified, the current list of ignore packages are appended to. 1000 * 1001 * <p> 1002 * Any classes within these packages will be serialized to strings using {@link Object#toString()}. 1003 * 1004 * <p> 1005 * Note that you can specify suffix patterns to include all subpackages. 1006 * 1007 * <ul class='notes'> 1008 * <li> 1009 * The default value excludes the following packages: 1010 * <ul> 1011 * <li><c>java.lang</c> 1012 * <li><c>java.lang.annotation</c> 1013 * <li><c>java.lang.ref</c> 1014 * <li><c>java.lang.reflect</c> 1015 * <li><c>java.io</c> 1016 * <li><c>java.net</c> 1017 * <li><c>java.nio.*</c> 1018 * <li><c>java.util.*</c> 1019 * </ul> 1020 * <li> 1021 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1022 * <li> 1023 * A default global value can be set via the system property <js>"BeanContext.notBeanPackages.ss"</js>. 1024 * </ul> 1025 * 1026 * <ul class='seealso'> 1027 * <li class='jf'>{@link BeanContext#BEAN_notBeanPackages} 1028 * </ul> 1029 */ 1030 String[] notBeanPackages() default {}; 1031 1032 /** 1033 * Configuration property: Add to packages whose classes should not be considered beans. 1034 * 1035 * <ul class='seealso'> 1036 * <li class='jf'>{@link BeanContext#BEAN_notBeanPackages} 1037 * </ul> 1038 */ 1039 String[] notBeanPackages_replace() default {}; 1040 1041 /** 1042 * Configuration property: Remove from packages whose classes should not be considered beans. 1043 * 1044 * <ul class='seealso'> 1045 * <li class='jf'>{@link BeanContext#BEAN_notBeanPackages} 1046 * </ul> 1047 */ 1048 String[] notBeanPackages_remove() default {}; 1049 1050 /** 1051 * Configuration property: POJO swaps. 1052 * 1053 * <p> 1054 * POJO swaps are used to "swap out" non-serializable classes with serializable equivalents during serialization, 1055 * and "swap in" the non-serializable class during parsing. 1056 * 1057 * <p> 1058 * An example of a POJO swap would be a <c>Calendar</c> object that gets swapped out for an ISO8601 string. 1059 * 1060 * <p> 1061 * Multiple POJO swaps can be associated with a single class. 1062 * <br>When multiple swaps are applicable to the same class, the media type pattern defined by 1063 * {@link PojoSwap#forMediaTypes()} or {@link Swap#mediaTypes() @Swap(mediaTypes)} are used to come up with the best match. 1064 * 1065 * <ul class='seealso'> 1066 * <li class='jf'>{@link BeanContext#BEAN_pojoSwaps} 1067 * <li class='link'>{@doc juneau-marshall.Transforms.PojoSwaps} 1068 * <li class='link'>{@doc juneau-marshall.Transforms.PerMediaTypePojoSwaps} 1069 * <li class='link'>{@doc juneau-marshall.Transforms.OneWayPojoSwaps} 1070 * <li class='link'>{@doc juneau-marshall.Transforms.SwapAnnotation} 1071 * <li class='link'>{@doc juneau-marshall.Transforms.AutoPojoSwaps} 1072 * <li class='link'>{@doc juneau-marshall.Transforms.SurrogateClasses} 1073 * </ul> 1074 */ 1075 Class<? extends PojoSwap<?,?>>[] pojoSwaps() default {}; 1076 1077 /** 1078 * Configuration property: Add to POJO swap classes. 1079 * 1080 * <ul class='seealso'> 1081 * <li class='jf'>{@link BeanContext#BEAN_pojoSwaps} 1082 * </ul> 1083 */ 1084 Class<? extends PojoSwap<?,?>>[] pojoSwaps_replace() default {}; 1085 1086 /** 1087 * Configuration property: Remove from POJO swap classes. 1088 * 1089 * <ul class='seealso'> 1090 * <li class='jf'>{@link BeanContext#BEAN_pojoSwaps} 1091 * </ul> 1092 */ 1093 Class<? extends PojoSwap<?,?>>[] pojoSwaps_remove() default {}; 1094 1095 /** 1096 * Configuration property: Bean property namer. 1097 * 1098 * <p> 1099 * The class to use for calculating bean property names. 1100 * 1101 * <p> 1102 * Predefined classes: 1103 * <ul> 1104 * <li>{@link PropertyNamerDefault} (default) 1105 * <li>{@link PropertyNamerDLC} - Dashed-lower-case names. 1106 * <li>{@link PropertyNamerULC} - Dashed-upper-case names. 1107 * </ul> 1108 * 1109 * <ul class='seealso'> 1110 * <li class='jf'>{@link BeanContext#BEAN_propertyNamer} 1111 * </ul> 1112 */ 1113 Class<? extends PropertyNamer> propertyNamer() default PropertyNamer.Null.class; 1114 1115 /** 1116 * Configuration property: Sort bean properties. 1117 * 1118 * <p> 1119 * When <jk>true</jk>, all bean properties will be serialized and access in alphabetical order. 1120 * <br>Otherwise, the natural order of the bean properties is used which is dependent on the JVM vendor. 1121 * <br>On IBM JVMs, the bean properties are ordered based on their ordering in the Java file. 1122 * <br>On Oracle JVMs, the bean properties are not ordered (which follows the official JVM specs). 1123 * 1124 * <p> 1125 * This property is disabled by default so that IBM JVM users don't have to use {@link Bean @Bean} annotations 1126 * to force bean properties to be in a particular order and can just alter the order of the fields/methods 1127 * in the Java file. 1128 * 1129 * <ul class='notes'> 1130 * <li> 1131 * Possible values: 1132 * <ul> 1133 * <li><js>"true"</js> 1134 * <li><js>"false"</js> (default) 1135 * </ul> 1136 * <li> 1137 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1138 * <li> 1139 * A default global value can be set via the system property <js>"BeanContext.sortProperties.b"</js>. 1140 * </ul> 1141 * 1142 * <ul class='seealso'> 1143 * <li class='jf'>{@link BeanContext#BEAN_sortProperties} 1144 * </ul> 1145 */ 1146 String sortProperties() default ""; 1147 1148 /** 1149 * Configuration property: Time zone. 1150 * 1151 * <p> 1152 * Specifies the default timezone for serializer and parser sessions. 1153 * 1154 * <ul class='notes'> 1155 * <li> 1156 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1157 * <li> 1158 * A default global value can be set via the system property <js>"BeanContext.timeZone.s"</js>. 1159 * </ul> 1160 * 1161 * <ul class='seealso'> 1162 * <li class='jf'>{@link BeanContext#BEAN_timeZone} 1163 * </ul> 1164 */ 1165 String timeZone() default ""; 1166 1167 /** 1168 * Configuration property: Use enum names. 1169 * 1170 * <p> 1171 * When enabled, enums are always serialized by name, not using {@link Object#toString()}. 1172 * 1173 * <ul class='notes'> 1174 * <li> 1175 * Possible values: 1176 * <ul> 1177 * <li><js>"true"</js> 1178 * <li><js>"false"</js> (default) 1179 * </ul> 1180 * <li> 1181 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1182 * <li> 1183 * A default global value can be set via the system property <js>"BeanContext.useEnumNames.b"</js>. 1184 * </ul> 1185 * 1186 * <ul class='seealso'> 1187 * <li class='jf'>{@link BeanContext#BEAN_useEnumNames} 1188 * </ul> 1189 */ 1190 String useEnumNames() default ""; 1191 1192 /** 1193 * Configuration property: Use interface proxies. 1194 * 1195 * <p> 1196 * If <js>"true"</js>, then interfaces will be instantiated as proxy classes through the use of an 1197 * {@link InvocationHandler} if there is no other way of instantiating them. 1198 * <br>Otherwise, throws a {@link BeanRuntimeException}. 1199 * 1200 * <ul class='notes'> 1201 * <li> 1202 * Possible values: 1203 * <ul> 1204 * <li><js>"true"</js> (default) 1205 * <li><js>"false"</js> 1206 * </ul> 1207 * <li> 1208 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1209 * <li> 1210 * A default global value can be set via the system property <js>"BeanContext.useInterfaceProxies.b"</js>. 1211 * </ul> 1212 * 1213 * <ul class='seealso'> 1214 * <li class='jf'>{@link BeanContext#BEAN_useInterfaceProxies} 1215 * </ul> 1216 */ 1217 String useInterfaceProxies() default ""; 1218 1219 /** 1220 * Configuration property: Use Java Introspector. 1221 * 1222 * <p> 1223 * Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters. 1224 * <br>Most {@link Bean @Bean} annotations will be ignored. 1225 * 1226 * <ul class='notes'> 1227 * <li> 1228 * Possible values: 1229 * <ul> 1230 * <li><js>"true"</js> 1231 * <li><js>"false"</js> (default) 1232 * </ul> 1233 * <li> 1234 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1235 * <li> 1236 * A default global value can be set via the system property <js>"BeanContext.useJavaBeanIntrospector.b"</js>. 1237 * </ul> 1238 * 1239 * <ul class='seealso'> 1240 * <li class='jf'>{@link BeanContext#BEAN_useJavaBeanIntrospector} 1241 * </ul> 1242 */ 1243 String useJavaBeanIntrospector() default ""; 1244 1245 //----------------------------------------------------------------------------------------------------------------- 1246 // BeanTraverseContext 1247 //----------------------------------------------------------------------------------------------------------------- 1248 1249 /** 1250 * Configuration property: Automatically detect POJO recursions. 1251 * 1252 * <p> 1253 * Specifies that recursions should be checked for during traversal. 1254 * 1255 * <p> 1256 * Recursions can occur when traversing models that aren't true trees but rather contain loops. 1257 * <br>In general, unchecked recursions cause stack-overflow-errors. 1258 * <br>These show up as {@link ParseException ParseExceptions} with the message <js>"Depth too deep. Stack overflow occurred."</js>. 1259 * 1260 * <p> 1261 * The behavior when recursions are detected depends on the value for {@link BeanTraverseContext#BEANTRAVERSE_ignoreRecursions}. 1262 * 1263 * <p> 1264 * For example, if a model contains the links A->B->C->A, then the JSON generated will look like 1265 * the following when <jsf>BEANTRAVERSE_ignoreRecursions</jsf> is <jk>true</jk>... 1266 * 1267 * <p class='bcode w800'> 1268 * {A:{B:{C:<jk>null</jk>}}} 1269 * </p> 1270 * 1271 * <ul class='notes'> 1272 * <li> 1273 * Checking for recursion can cause a small performance penalty. 1274 * <li> 1275 * Possible values: 1276 * <ul> 1277 * <li><js>"true"</js> 1278 * <li><js>"false"</js> (default) 1279 * </ul> 1280 * <li> 1281 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1282 * <li> 1283 * A default global value can be set via the system property <js>"BeanTraverseContext.detectRecursions.b"</js>. 1284 * </ul> 1285 * 1286 * <ul class='seealso'> 1287 * <li class='jf'>{@link BeanTraverseContext#BEANTRAVERSE_detectRecursions} 1288 * </ul> 1289 */ 1290 String detectRecursions() default ""; 1291 1292 /** 1293 * Configuration property: Ignore recursion errors. 1294 * 1295 * <p> 1296 * Used in conjunction with {@link BeanTraverseContext#BEANTRAVERSE_detectRecursions}. 1297 * <br>Setting is ignored if <jsf>BEANTRAVERSE_detectRecursions</jsf> is <js>"false"</js>. 1298 * 1299 * <p> 1300 * If <js>"true"</js>, when we encounter the same object when traversing a tree, we set the value to <jk>null</jk>. 1301 * <br>Otherwise, a {@link BeanRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>. 1302 * 1303 * <ul class='notes'> 1304 * <li> 1305 * Possible values: 1306 * <ul> 1307 * <li><js>"true"</js> 1308 * <li><js>"false"</js> (default) 1309 * </ul> 1310 * <li> 1311 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1312 * <li> 1313 * A default global value can be set via the system property <js>"BeanTraverseContext.ignoreRecursions.b"</js>. 1314 * </ul> 1315 * 1316 * <ul class='seealso'> 1317 * <li class='jf'>{@link BeanTraverseContext#BEANTRAVERSE_ignoreRecursions} 1318 * </ul> 1319 */ 1320 String ignoreRecursions() default ""; 1321 1322 /** 1323 * Configuration property: Initial depth. 1324 * 1325 * <p> 1326 * The initial indentation level at the root. 1327 * <br>Useful when constructing document fragments that need to be indented at a certain level. 1328 * 1329 * <ul class='notes'> 1330 * <li> 1331 * Format: integer 1332 * <li> 1333 * Default value: <js>"0"</js> 1334 * <li> 1335 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1336 * <li> 1337 * A default global value can be set via the system property <js>"BeanTraverseContext.initialDepth.i"</js>. 1338 * </ul> 1339 * 1340 * <ul class='seealso'> 1341 * <li class='jf'>{@link BeanTraverseContext#BEANTRAVERSE_initialDepth} 1342 * </ul> 1343 */ 1344 String initialDepth() default ""; 1345 1346 /** 1347 * Configuration property: Max traversal depth. 1348 * 1349 * <p> 1350 * Abort traversal if specified depth is reached in the POJO tree. 1351 * <br>If this depth is exceeded, an exception is thrown. 1352 * 1353 * <ul class='notes'> 1354 * <li> 1355 * Format: integer 1356 * <li> 1357 * Default value: <js>"100"</js> 1358 * <li> 1359 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 1360 * <li> 1361 * A default global value can be set via the system property <js>"BeanTraverseContext.maxDepth.i"</js>. 1362 * </ul> 1363 * 1364 * <ul class='seealso'> 1365 * <li class='jf'>{@link BeanTraverseContext#BEANTRAVERSE_maxDepth} 1366 * </ul> 1367 */ 1368 String maxDepth() default ""; 1369}