Record Class InstanceBeanProvider
java.lang.Object
java.lang.Record
cool.scx.bean.provider.InstanceBeanProvider
- All Implemented Interfaces:
BeanProvider
根据一个 已经存在的 Bean 创建
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionInstanceBeanProvider(Object bean) Creates an instance of aInstanceBeanProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbean()Returns the value of thebeanrecord component.Class<?> 表示 getBean() 返回的对象类型final booleanIndicates whether some other object is "equal to" this one.getBean(BeanFactory beanFactory) 获取 Beanfinal inthashCode()Returns a hash code value for this object.boolean表示 getBean() 是否始终返回同一实例final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InstanceBeanProvider
Creates an instance of aInstanceBeanProviderrecord class.- Parameters:
bean- the value for thebeanrecord component
-
-
Method Details
-
getBean
Description copied from interface:BeanProvider获取 Bean- Specified by:
getBeanin interfaceBeanProvider
-
singleton
public boolean singleton()Description copied from interface:BeanProvider表示 getBean() 是否始终返回同一实例- Specified by:
singletonin interfaceBeanProvider
-
beanClass
Description copied from interface:BeanProvider表示 getBean() 返回的对象类型- Specified by:
beanClassin interfaceBeanProvider
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
bean
Returns the value of thebeanrecord component.- Returns:
- the value of the
beanrecord component
-