Package org.apache.juneau.commons.bean
package org.apache.juneau.commons.bean
Bean-modeling layer for Juneau.
Contains the bean-modeling annotations, runtime types, and SPI seams that describe how Java types
map to bean property sets, independent of any marshalling concerns. The marshalling layer (in
juneau-marshall) layers serializer / parser / swap behavior on top of these primitives.
Annotations
@BeanType— marks a class as a bean and configures bean-level options (interface class, stop class, property order, etc.).@BeanProp— configures a bean property (name, getter, setter, etc.).@BeanCtor— marks a constructor as the bean constructor and names its arguments.@BeanIgnore— marks a class, method, field, or constructor as not a bean / not a bean property.@BeanConfig— applies bean-modeling settings declaratively at the config-annotation level.@Name— alternative property name on a parameter.
Runtime types
BeanMeta— metadata describing a bean class (properties, constructor, type info).BeanPropertyMeta— metadata describing a single bean property.BeanMap—Mapview of a bean backed by itsBeanMeta.BeanMapEntry—Map.Entryview of a single bean property.BeanPropertyValue— read-side property holder used by consumers that iterate bean properties.BeanPropertyConsumer— callback for iterating bean properties without materializing aBeanMap.BeanProxyInvocationHandler—InvocationHandlerthat backs interface-only bean proxies.BeanInterceptor— pre/post hooks fired around bean property reads / writes.
SPI seams
BeanConfigContext— immutable POJO carrying all bean-modeling configuration knobs plus SPI hooks.MarshallingContext(injuneau-marshall) installs the marshalling-side resolver / initializer / post-processor.BeanInfo— abstract type-classification surface;ClassMetaextends it on the marshalling side.BeanTypeResolver— resolvesTypereferences toBeanInfoinstances.BeanSession— per-operation session surface (type conversion, sub-bean construction, CharSequence parsing).BeanFilter— per-class filter surface;MarshalledFilterimplements it.BeanRegistryLookup— bean-dictionary lookup surface;BeanRegistryimplements it.BeanMetaInitializer— hook that lets marshalling-side code augmentBeanMetaconstruction (filter discovery, type-name resolution, bean-registry assembly).BeanPropertyPostProcessor— hook that lets marshalling-side code augmentBeanPropertyMetaconstruction (swap / surrogate / format annotation processing).Delegate— pluggable delegate-bean marker.PropertyNamer— pluggable Java-name to bean-property-name transformer.
Thread safety
Practical thread-safety semantics for primary runtime types and SPI seams in this package:
- Not thread-safe (mutable, no internal synchronization):
BeanMap,BeanProxyInvocationHandler,BeanConfigContext.Builder. - Thread-safe after construction (immutable metadata/value holders):
BeanConfigContext,BeanMeta,BeanPropertyMeta,BeanPropertyValue,BeanMapEntry. - Thread safety depends on implementation/state:
BeanSession,BeanFilter,BeanRegistryLookup,BeanMetaInitializer,BeanPropertyPostProcessor,BeanPropertyConsumer,BeanInfo.
-
ClassDescriptionDefault property namer.Annotation for specifying bean-modeling config properties on REST classes and methods.Utility classes and methods for the
@BeanConfigannotation.Immutable runtime configuration for the bean-modeling layer.Builder forBeanConfigContext.Maps constructor arguments to property names on beans with read-only properties.Utility classes and methods for the@BeanCtorannotation.Builder class.Bean-modeling SPI seam that exposes the per-class filter surface the bean-runtime types (BeanMeta-equivalent) need without coupling the bean-modeling layer to the marshalling-sideMarshalledFilter.Excludes a class, field, method, or constructor from bean introspection.Utility classes and methods for the@BeanIgnoreannotation.Builder class.BeanInfo<T>Bean-modeling SPI seam that exposes the type-classification surface the bean-runtime types (BeanMeta-equivalents,BeanPropertyMeta-equivalents, etc.) need without coupling the bean-modeling layer to the marshalling-sideClassMeta.Bean interceptor.Non-existent bean interceptor.BeanMap<T>Java bean wrapper class.Represents a single entry in a bean map.BeanMeta<T>Encapsulates all access to the properties of a bean class (like a souped-upBeanInfo).Represents the result of creating a BeanMeta, including the bean metadata and any reason why it's not a bean.Bean-modeling SPI seam that exposes marshalling-awareBeanMetaconstruction hooks.Annotation that can be applied to bean fields, getter/setter methods, and constructor parameters to control bean introspection and property modeling.Utility classes and methods for the@BeanPropannotation.Builder class.Represents a consumer of a single bean property value.Contains metadata about a bean property.BeanPropertyMeta builder class.Bean-modeling SPI seam that applies marshalling-side post-processing to aBeanPropertyMeta.BuilderafterBeanPropertyMeta.Builder#validate()succeeds.Represents a simple bean property value and the meta-data associated with it.Provides anInvocationHandlerfor creating dynamic proxy instances of bean interfaces.Bean-modeling SPI seam that exposes the dictionary-lookup surface the bean-runtime types need without coupling the bean-modeling layer to the marshalling-sideBeanRegistry.Minimum runtime surface that the bean-modeling layer needs from a marshalling session.Annotation that can be applied to classes to control bean introspection and modeling.Utility classes and methods for the@BeanTypeannotation.Builder class.Bean-modeling SPI seam that exposes the type-resolution operations the bean-property validation pass needs from the marshalling layer.Delegate<T>An object that represents another object, often wrapping that object.Specifies the parameter name for bean property mapping.Defines an API for converting conventional bean property names to some other form.Represents a non-existent class.Converts property names to dashed-lower-case format.Converts property names to dashed-upper-case-start format.Converts property names to underscore-lower-case format.Validates a bean-property value against a schema.BuildsPropertyValidatorinstances from a JSON-Schema-shaped map of constraints.Discovery helper forPropertyValidatorFactoryviaServiceLoader.