Record Class RegisteredBean.InstantiationDescriptor
java.lang.Object
java.lang.Record
org.springframework.beans.factory.support.RegisteredBean.InstantiationDescriptor
- Record Components:
executable
- theExecutable
(Constructor
orMethod
) to invoketargetClass
- the targetClass
of the executable
- Enclosing class:
- RegisteredBean
public static record RegisteredBean.InstantiationDescriptor(Executable executable, Class<?> targetClass)
extends Record
Descriptor for how a bean should be instantiated. While the
targetClass
is usually the declaring class of the executable
(in case of a constructor
or a locally declared factory method), there are cases where retaining the actual
concrete class is necessary (e.g. for an inherited factory method).- Since:
- 6.1.7
-
Constructor Summary
ConstructorDescriptionInstantiationDescriptor
(Executable executable) InstantiationDescriptor
(Executable executable, Class<?> targetClass) Creates an instance of aInstantiationDescriptor
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexecutable
record component.final int
hashCode()
Returns a hash code value for this object.Class<?>
Returns the value of thetargetClass
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
InstantiationDescriptor
-
InstantiationDescriptor
Creates an instance of aInstantiationDescriptor
record class.- Parameters:
executable
- the value for theexecutable
record componenttargetClass
- the value for thetargetClass
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
executable
Returns the value of theexecutable
record component.- Returns:
- the value of the
executable
record component
-
targetClass
Returns the value of thetargetClass
record component.- Returns:
- the value of the
targetClass
record component
-