Package lib.dto
Record Class MethodDTO
java.lang.Object
java.lang.Record
lib.dto.MethodDTO
- Record Components:
name
- - name of the methodsrcBeginLine
- - the number of the first line of the method inside the fileendBeginLine
- - the number of the last line of the method inside the filemodifiers
- - the modifiers of the method, e.g. public, static, final...
public record MethodDTO(String name, int srcBeginLine, int endBeginLine, String modifiers)
extends Record
Record representing a serializable version of a
MethodInfo
.
Used for classes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of theendBeginLine
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themodifiers
record component.name()
Returns the value of thename
record component.int
Returns the value of thesrcBeginLine
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MethodDTO
Record representing a serializable version of aMethodInfo
. Used for interfaces.- Parameters:
name
- - name of the methodsrcBeginLine
- - the number of the first line of the method inside the fileendBeginLine
- - the number of the last line of the method inside the file
-
MethodDTO
Creates an instance of aMethodDTO
record class.- Parameters:
name
- the value for thename
record componentsrcBeginLine
- the value for thesrcBeginLine
record componentendBeginLine
- the value for theendBeginLine
record componentmodifiers
- the value for themodifiers
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
srcBeginLine
public int srcBeginLine()Returns the value of thesrcBeginLine
record component.- Returns:
- the value of the
srcBeginLine
record component
-
endBeginLine
public int endBeginLine()Returns the value of theendBeginLine
record component.- Returns:
- the value of the
endBeginLine
record component
-
modifiers
Returns the value of themodifiers
record component.- Returns:
- the value of the
modifiers
record component
-