Module bus.pager

Class MetaObjectWithCache

java.lang.Object
org.miaixz.bus.pager.binding.MetaObjectWithCache

public class MetaObjectWithCache extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.ibatis.reflection.factory.ObjectFactory
    The default ObjectFactory for creating new object instances.
    static final org.apache.ibatis.reflection.wrapper.ObjectWrapperFactory
    The default ObjectWrapperFactory for wrapping objects.
    static final org.apache.ibatis.reflection.ReflectorFactory
    The default ReflectorFactory for creating and caching Reflector instances.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.ibatis.reflection.MetaObject
    forObject(Object object)
    Creates a MetaObject for the given object using cached reflection factories.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_OBJECT_FACTORY

      public static final org.apache.ibatis.reflection.factory.ObjectFactory DEFAULT_OBJECT_FACTORY
      The default ObjectFactory for creating new object instances.
    • DEFAULT_OBJECT_WRAPPER_FACTORY

      public static final org.apache.ibatis.reflection.wrapper.ObjectWrapperFactory DEFAULT_OBJECT_WRAPPER_FACTORY
      The default ObjectWrapperFactory for wrapping objects.
    • DEFAULT_REFLECTOR_FACTORY

      public static final org.apache.ibatis.reflection.ReflectorFactory DEFAULT_REFLECTOR_FACTORY
      The default ReflectorFactory for creating and caching Reflector instances.
  • Constructor Details

    • MetaObjectWithCache

      public MetaObjectWithCache()
  • Method Details

    • forObject

      public static org.apache.ibatis.reflection.MetaObject forObject(Object object)
      Creates a MetaObject for 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 MetaObject instance for the given object
      Throws:
      org.miaixz.bus.core.lang.exception.PageException - if an error occurs during MetaObject creation