Record Class JavaNesting
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaNesting
public record JavaNesting(JavaNestingKind kind, Optional<JavaTypeName> lexicalOwner, Optional<String> simpleName, Optional<JavaEnclosingDeclaration> enclosingDeclaration, List<JavaInnerClassEvidence> innerClassTable, JavaTypeName nestHost, List<JavaTypeName> declaredNestMembers, List<NestingDiagnostic> diagnostics, boolean diagnosticsTruncated)
extends Record
Lexical and JVM nestmate evidence kept as separate, immutable concepts.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaNesting(JavaNestingKind kind, Optional<JavaTypeName> lexicalOwner, Optional<String> simpleName, Optional<JavaEnclosingDeclaration> enclosingDeclaration, List<JavaInnerClassEvidence> innerClassTable, JavaTypeName nestHost, List<JavaTypeName> declaredNestMembers, List<NestingDiagnostic> diagnostics, boolean diagnosticsTruncated) Creates an instance of aJavaNestingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeclaredNestMembersrecord component.Returns the value of thediagnosticsrecord component.booleanReturns the value of thediagnosticsTruncatedrecord component.Returns the value of theenclosingDeclarationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinnerClassTablerecord component.kind()Returns the value of thekindrecord component.Returns the value of thelexicalOwnerrecord component.nestHost()Returns the value of thenestHostrecord component.Returns the value of thesimpleNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MAXIMUM_DIAGNOSTICS
public static final int MAXIMUM_DIAGNOSTICS- See Also:
-
-
Constructor Details
-
JavaNesting
public JavaNesting(JavaNestingKind kind, Optional<JavaTypeName> lexicalOwner, Optional<String> simpleName, Optional<JavaEnclosingDeclaration> enclosingDeclaration, List<JavaInnerClassEvidence> innerClassTable, JavaTypeName nestHost, List<JavaTypeName> declaredNestMembers, List<NestingDiagnostic> diagnostics, boolean diagnosticsTruncated) Creates an instance of aJavaNestingrecord class.- Parameters:
kind- the value for thekindrecord componentlexicalOwner- the value for thelexicalOwnerrecord componentsimpleName- the value for thesimpleNamerecord componentenclosingDeclaration- the value for theenclosingDeclarationrecord componentinnerClassTable- the value for theinnerClassTablerecord componentnestHost- the value for thenestHostrecord componentdeclaredNestMembers- the value for thedeclaredNestMembersrecord componentdiagnostics- the value for thediagnosticsrecord componentdiagnosticsTruncated- the value for thediagnosticsTruncatedrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
lexicalOwner
Returns the value of thelexicalOwnerrecord component.- Returns:
- the value of the
lexicalOwnerrecord component
-
simpleName
-
enclosingDeclaration
Returns the value of theenclosingDeclarationrecord component.- Returns:
- the value of the
enclosingDeclarationrecord component
-
innerClassTable
Returns the value of theinnerClassTablerecord component.- Returns:
- the value of the
innerClassTablerecord component
-
nestHost
Returns the value of thenestHostrecord component.- Returns:
- the value of the
nestHostrecord component
-
declaredNestMembers
Returns the value of thedeclaredNestMembersrecord component.- Returns:
- the value of the
declaredNestMembersrecord component
-
diagnostics
Returns the value of thediagnosticsrecord component.- Returns:
- the value of the
diagnosticsrecord component
-
diagnosticsTruncated
public boolean diagnosticsTruncated()Returns the value of thediagnosticsTruncatedrecord component.- Returns:
- the value of the
diagnosticsTruncatedrecord component
-