java.lang.Object
org.miaixz.bus.pager.binding.MetaObjectWithCache
Provides a cached reflection mechanism to improve reflection performance. This class uses MyBatis's
MetaObject with default factories and a reflector factory to efficiently handle object reflection.- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.ibatis.reflection.factory.ObjectFactoryThe defaultObjectFactoryfor creating new object instances.static final org.apache.ibatis.reflection.wrapper.ObjectWrapperFactoryThe defaultObjectWrapperFactoryfor wrapping objects.static final org.apache.ibatis.reflection.ReflectorFactoryThe defaultReflectorFactoryfor creating and cachingReflectorinstances. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_OBJECT_FACTORY
public static final org.apache.ibatis.reflection.factory.ObjectFactory DEFAULT_OBJECT_FACTORYThe defaultObjectFactoryfor creating new object instances. -
DEFAULT_OBJECT_WRAPPER_FACTORY
public static final org.apache.ibatis.reflection.wrapper.ObjectWrapperFactory DEFAULT_OBJECT_WRAPPER_FACTORYThe defaultObjectWrapperFactoryfor wrapping objects. -
DEFAULT_REFLECTOR_FACTORY
public static final org.apache.ibatis.reflection.ReflectorFactory DEFAULT_REFLECTOR_FACTORYThe defaultReflectorFactoryfor creating and cachingReflectorinstances.
-
-
Constructor Details
-
MetaObjectWithCache
public MetaObjectWithCache()
-
-
Method Details
-
forObject
Creates aMetaObjectfor the given object using cached reflection factories. This method provides an optimized way to access object properties and methods.- Parameters:
object- the object for which to create a MetaObject- Returns:
- a
MetaObjectinstance for the given object - Throws:
org.miaixz.bus.core.lang.exception.PageException- if an error occurs during MetaObject creation
-