Record Class Property
java.lang.Object
java.lang.Record
smile.data.type.Property
- Record Components:
name- the property name.type- the class type.accessor- the read accessor.field- the struct field.
public record Property(String name, Class<?> type, Method accessor, StructField field)
extends Record
A component in record or a property in a Java Bean class.
-
Constructor Summary
ConstructorsConstructorDescriptionProperty(String name, Class<?> type, Method accessor, StructField field) Creates an instance of aPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaccessor()Returns the value of theaccessorrecord component.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.static Propertyof(PropertyDescriptor prop) Returns the property for a bean property.static Property[]Returns the properties of record or bean class.static Propertyof(RecordComponent prop) Returns the property for a record component.final StringtoString()Returns a string representation of this record class.Class<?> type()Returns the value of thetyperecord component.
-
Constructor Details
-
Method Details
-
of
Returns the property for a record component.- Parameters:
prop- a record component.- Returns:
- the property for a record component.
-
of
Returns the property for a bean property.- Parameters:
prop- a property descriptor.- Returns:
- the property for a bean property.
-
of
Returns the properties of record or bean class.- Parameters:
clazz- The class type.- Returns:
- the properties.
- Throws:
IntrospectionException- if an exception occurs during introspection.
-
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). -
name
-
type
-
accessor
-
field
-