Record Class MethodHierarchy.Declaration
java.lang.Object
java.lang.Record
io.micronaut.reflection.MethodHierarchy.Declaration
- Record Components:
declaringType- The type declaring itannotationMetadata- The annotations of the method, without the ones of its declaring typearguments- The parametersreturnArgument- The return valueexact- Whether the annotations are the ones of this declaration only: a generated introspection merges the annotations of the overridden methods into them
- Enclosing class:
MethodHierarchy
public static record MethodHierarchy.Declaration(Class<?> declaringType, AnnotationMetadata annotationMetadata, Argument<?>[] arguments, Argument<?> returnArgument, boolean exact)
extends Record
One declaration of a method by one type of a hierarchy.
- Since:
- 5.2.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorsConstructorDescriptionDeclaration(Class<?> declaringType, AnnotationMetadata annotationMetadata, Argument<?>[] arguments, Argument<?> returnArgument, boolean exact) Creates an instance of aDeclarationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationMetadatarecord component.Argument<?>[]Returns the value of theargumentsrecord component.static AnnotationMetadatadeclaredOf(AnnotationMetadata annotationMetadata) The annotations declared on an executable, without the ones of its class: the executable methods of beans carry both.Class<?> Returns the value of thedeclaringTyperecord component.booleanIndicates whether some other object is "equal to" this one.booleanexact()Returns the value of theexactrecord component.inthashCode()Returns a hash code value for this object.static MethodHierarchy.Declarationof(BeanMethod<?, ?> method, boolean exact) The declaration a bean method reports.static MethodHierarchy.Declarationof(ExecutableMethod<?, ?> method) The declaration an executable method reports.static MethodHierarchy.DeclarationThe declaration read from aMethoditself.static MethodHierarchy.DeclarationThe declaration a type reads under a method, with the arguments and the return that type sees: a method a generic super type declares is read with the values the reading type gives the variables, as the processors generate them for it, rather than with the bounds of the variables.Argument<?> Returns the value of thereturnArgumentrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Declaration
public Declaration(Class<?> declaringType, AnnotationMetadata annotationMetadata, Argument<?>[] arguments, Argument<?> returnArgument, boolean exact) Creates an instance of aDeclarationrecord class.- Parameters:
declaringType- the value for thedeclaringTyperecord componentannotationMetadata- the value for theannotationMetadatarecord componentarguments- the value for theargumentsrecord componentreturnArgument- the value for thereturnArgumentrecord componentexact- the value for theexactrecord component
-
-
Method Details
-
of
The declaration an executable method reports. The metadata of an executable method merges the annotations of the methods it overrides, so the declaration is notexact().- Parameters:
method- The method- Returns:
- The declaration
-
of
The declaration a bean method reports.- Parameters:
method- The methodexact- Whether the introspection reporting it tells the annotations of this declaration apart from the ones of the methods it overrides- Returns:
- The declaration
-
of
-
of
The declaration a type reads under a method, with the arguments and the return that type sees: a method a generic super type declares is read with the values the reading type gives the variables, as the processors generate them for it, rather than with the bounds of the variables. The type declaring the method is still the type of the declaration, which is what the hierarchy is walked from.- Parameters:
method- The methodcontext- The type reading the method, an implementation of its declaring type- Returns:
- The declaration
-
declaredOf
The annotations declared on an executable, without the ones of its class: the executable methods of beans carry both. A metadata that is not a hierarchy is returned as is,getDeclaredMetadata()would drop the repeated annotations.- Parameters:
annotationMetadata- The metadata- Returns:
- The metadata of the executable alone
-
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 thecomparemethod from their corresponding wrapper classes. -
hashCode
-
toString
-
declaringType
Returns the value of thedeclaringTyperecord component.- Returns:
- the value of the
declaringTyperecord component
-
annotationMetadata
Returns the value of theannotationMetadatarecord component.- Returns:
- the value of the
annotationMetadatarecord component
-
arguments
-
returnArgument
Returns the value of thereturnArgumentrecord component.- Returns:
- the value of the
returnArgumentrecord component
-
exact
-