@Documented @Target(value=CONSTRUCTOR) @Retention(value=RUNTIME) @Inherited public @interface BeanConstructor
This annotation can be used in the case of beans with properties whose values can only be set by passing them in
through a constructor on the class.
Since method parameter names are lost during compilation, this annotation essentially redefines them so that they are available at runtime.
This annotation can only be applied to constructors and can only be applied to one constructor per class.
When present, bean instantiation is delayed until the call to
Until then, bean property values are stored in a local cache until
getBean() is called.
Because of this additional caching step, parsing into read-only beans tends to be slower and use more memory than
parsing into beans with writable properties.
Attempting to call
BeanMap.put(String,Object) on a read-only property after calling
will result in a
BeanRuntimeException being thrown.
Multiple calls to
BeanMap.getBean() will return the same bean instance.
Copyright © 2018 Apache. All rights reserved.