Record Class JavaEnclosingDeclaration
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaEnclosingDeclaration
- All Implemented Interfaces:
Comparable<JavaEnclosingDeclaration>
public record JavaEnclosingDeclaration(JavaTypeName owner, Optional<String> methodName, Optional<String> methodDescriptor)
extends Record
implements Comparable<JavaEnclosingDeclaration>
Exact EnclosingMethod evidence; the method is absent when the attribute names only a class.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaEnclosingDeclaration(JavaTypeName owner, Optional<String> methodName, Optional<String> methodDescriptor) Creates an instance of aJavaEnclosingDeclarationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themethodDescriptorrecord component.Returns the value of themethodNamerecord component.owner()Returns the value of theownerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JavaEnclosingDeclaration
public JavaEnclosingDeclaration(JavaTypeName owner, Optional<String> methodName, Optional<String> methodDescriptor) Creates an instance of aJavaEnclosingDeclarationrecord class.- Parameters:
owner- the value for theownerrecord componentmethodName- the value for themethodNamerecord componentmethodDescriptor- the value for themethodDescriptorrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<JavaEnclosingDeclaration>
-
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). -
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
methodName
-
methodDescriptor
-