Package com.alibaba.fastjson2.introspect
package com.alibaba.fastjson2.introspect
Provides reflection-based property access functionality for fastjson2.
This package contains classes and interfaces for efficient property access
during JSON serialization and deserialization operations.
The core of this package is the PropertyAccessor
interface, which provides a unified API for getting and setting object properties
regardless of the underlying access mechanism (field access, method calls, or functional interfaces).
The PropertyAccessorFactory class serves as
the main factory for creating optimized property accessors based on the property type
and access method, providing implementations for primitive types, wrapper classes,
and complex objects.
Key features of this package include:
- Optimized accessors for primitive types to avoid boxing/unboxing overhead
- Support for both field-based and method-based property access
- Functional interface-based accessors for maximum performance
- Automatic type conversion between compatible types
- Exception handling with detailed error messages
- Since:
- 2.0
- Author:
- wenshao
-
ClassDescriptionAbstract base class for field-based property accessors.Abstract base class for function-based property accessors.Abstract base class for method-based property accessors.Interface for accessing object properties generically.A factory class for creating property accessors that provide efficient getter and setter operations for object properties using reflection, method handles, or functional interfaces.Interface for property accessors that handle BigDecimal-typed properties.Interface for property accessors that handle BigInteger-typed properties.Interface for property accessors that handle boolean-typed properties.Interface for property accessors that handle byte-typed properties.Interface for property accessors that handle char-typed properties.Interface for property accessors that handle double-typed properties.Interface for property accessors that handle int-typed properties.Interface for property accessors that handle long-typed properties.Interface for property accessors that handle object-typed properties.Interface for property accessors that handle short-typed properties.Interface for property accessors that handle String-typed properties.A specialized property accessor factory that uses Unsafe operations for field access to provide better performance compared to reflection-based access.