Record Class MethodDescription
java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.definitions.description.MethodDescription
- Record Components:
declaringClass- the declaringClassof this methodreturnType- theClassthis method returnsname- the name of the methodparameters- aSequencedCollectionof theParameterDescriptions of this methodannotations- aCollectionof allAnnotations this method is annotated withinvoker- the correspondingInvoker, used to invoke this method
- All Implemented Interfaces:
Description
public record MethodDescription(Class<?> declaringClass, Class<?> returnType, String name, SequencedCollection<ParameterDescription> parameters, Collection<AnnotationDescription<?>> annotations, Invoker invoker)
extends Record
implements Description
A
Description that describes a method.-
Constructor Summary
ConstructorsConstructorDescriptionMethodDescription(Class<?> declaringClass, Class<?> returnType, String name, SequencedCollection<ParameterDescription> parameters, Collection<AnnotationDescription<?>> annotations, Invoker invoker) Creates an instance of aMethodDescriptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.Class<?> Returns the value of thedeclaringClassrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.invoker()Returns the value of theinvokerrecord component.name()Returns the value of thenamerecord component.Returns the value of theparametersrecord component.Class<?> Returns the value of thereturnTyperecord component.toString()Returns a string representation of this record class.Methods inherited from interface Description
annotation
-
Constructor Details
-
MethodDescription
public MethodDescription(Class<?> declaringClass, Class<?> returnType, String name, SequencedCollection<ParameterDescription> parameters, Collection<AnnotationDescription<?>> annotations, Invoker invoker) Creates an instance of aMethodDescriptionrecord class.- Parameters:
declaringClass- the value for thedeclaringClassrecord componentreturnType- the value for thereturnTyperecord componentname- the value for thenamerecord componentparameters- the value for theparametersrecord componentannotations- the value for theannotationsrecord componentinvoker- the value for theinvokerrecord component
-
-
Method Details
-
toMethodType
- Returns:
- the return type and parameters of this method as a
MethodType
-
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). -
declaringClass
Returns the value of thedeclaringClassrecord component.- Returns:
- the value of the
declaringClassrecord component
-
returnType
Returns the value of thereturnTyperecord component.- Returns:
- the value of the
returnTyperecord component
-
name
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceDescription- Returns:
- the value of the
annotationsrecord component
-
invoker
-