Package lib.dto
Record Class ClassInterfaceDTO
java.lang.Object
java.lang.Record
lib.dto.ClassInterfaceDTO
- Record Components:
name
- - name of the classpath
- - path of the classmethods
- -List
that contains tne class' methodsfields
- -List
that contains tne class' fields
public record ClassInterfaceDTO(String name, String path, List<MethodDTO> methods, List<FieldDTO> fields)
extends Record
Record representing a serializable version of a
ClassReport
.-
Constructor Summary
ConstructorsConstructorDescriptionClassInterfaceDTO
(String name, String path, List<MethodDTO> methods) Different constructor for tne record used to create a serializable version of aInterfaceReport
.Creates an instance of aClassInterfaceDTO
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.fields()
Returns the value of thefields
record component.final int
hashCode()
Returns a hash code value for this object.methods()
Returns the value of themethods
record component.name()
Returns the value of thename
record component.path()
Returns the value of thepath
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ClassInterfaceDTO
Different constructor for tne record used to create a serializable version of aInterfaceReport
. It use the constructor for the class record they have almost the same elements, but it does not take a param representing the fields, because Interface cannot have them.- Parameters:
name
- - name of the interfacepath
- - path of the interfacemethods
- -List
that contains tne interface's methods
-
ClassInterfaceDTO
Creates an instance of aClassInterfaceDTO
record class.
-
-
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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-
methods
Returns the value of themethods
record component.- Returns:
- the value of the
methods
record component
-
fields
Returns the value of thefields
record component.- Returns:
- the value of the
fields
record component
-