Record Class ParsedClassFile
java.lang.Object
java.lang.Record
dev.archunitjava.importer.ParsedClassFile
- All Implemented Interfaces:
Comparable<ParsedClassFile>
public record ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames, ParsedNestingMetadata nestingMetadata, ParsedConstantPoolEvidence constantPoolEvidence, Optional<ParsedModuleDescriptor> module)
extends Record
implements Comparable<ParsedClassFile>
Backend-neutral class header extracted from an untrusted class resource.
-
Constructor Summary
ConstructorsConstructorDescriptionParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence) ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> sourceFile, List<ParsedMember> declaredMembers) ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers) ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults) ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature) ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames) ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames, ParsedNestingMetadata nestingMetadata) ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames, ParsedNestingMetadata nestingMetadata, ParsedConstantPoolEvidence constantPoolEvidence) ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames, ParsedNestingMetadata nestingMetadata, ParsedConstantPoolEvidence constantPoolEvidence, Optional<ParsedModuleDescriptor> module) Creates an instance of aParsedClassFilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theaccessFlagsrecord component.Returns the value of theannotationDefaultsrecord component.Returns the value of theannotationsrecord component.Returns the value of thebinaryNamerecord component.intcompareTo(ParsedClassFile other) Returns the value of theconstantPoolEvidencerecord component.Returns the value of thedeclaredMembersrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegenericSignaturerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinterfaceBinaryNamesrecord component.intReturns the value of themajorVersionrecord component.intReturns the value of theminorVersionrecord component.module()Returns the value of themodulerecord component.booleanReturns the value of themoduleDescriptorrecord component.Returns the value of thenestingMetadatarecord component.origin()Returns the value of theoriginrecord component.Returns the value of thepermittedSubclassBinaryNamesrecord component.intReturns the value of theprecedencerecord component.Returns the value of therecordComponentsrecord component.booleanReturns the value of therecordDeclarationrecord component.Returns the value of theresourceNamerecord component.booleanReturns the value of thesealedDeclarationrecord component.Returns the value of thesourceFilerecord component.Returns the value of thesuperclassBinaryNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames, ParsedNestingMetadata nestingMetadata, ParsedConstantPoolEvidence constantPoolEvidence, Optional<ParsedModuleDescriptor> module) Creates an instance of aParsedClassFilerecord class.- Parameters:
binaryName- the value for thebinaryNamerecord componentaccessFlags- the value for theaccessFlagsrecord componentmajorVersion- the value for themajorVersionrecord componentminorVersion- the value for theminorVersionrecord componentmoduleDescriptor- the value for themoduleDescriptorrecord componentresourceName- the value for theresourceNamerecord componentorigin- the value for theoriginrecord componentprecedence- the value for theprecedencerecord componentsuperclassBinaryName- the value for thesuperclassBinaryNamerecord componentinterfaceBinaryNames- the value for theinterfaceBinaryNamesrecord componentsourceFile- the value for thesourceFilerecord componentdeclaredMembers- the value for thedeclaredMembersrecord componentannotations- the value for theannotationsrecord componentannotationDefaults- the value for theannotationDefaultsrecord componentgenericSignature- the value for thegenericSignaturerecord componentrecordDeclaration- the value for therecordDeclarationrecord componentrecordComponents- the value for therecordComponentsrecord componentsealedDeclaration- the value for thesealedDeclarationrecord componentpermittedSubclassBinaryNames- the value for thepermittedSubclassBinaryNamesrecord componentnestingMetadata- the value for thenestingMetadatarecord componentconstantPoolEvidence- the value for theconstantPoolEvidencerecord componentmodule- the value for themodulerecord component
-
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames, ParsedNestingMetadata nestingMetadata, ParsedConstantPoolEvidence constantPoolEvidence) -
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames, ParsedNestingMetadata nestingMetadata) -
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence) -
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> sourceFile, List<ParsedMember> declaredMembers) -
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers) -
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults) -
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature) -
ParsedClassFile
public ParsedClassFile(String binaryName, int accessFlags, int majorVersion, int minorVersion, boolean moduleDescriptor, String resourceName, ClassFileOrigin origin, int precedence, Optional<String> superclassBinaryName, List<String> interfaceBinaryNames, Optional<String> sourceFile, List<ParsedMember> declaredMembers, List<ParsedAnnotationOccurrence> annotations, List<ParsedAnnotationDefault> annotationDefaults, Optional<String> genericSignature, boolean recordDeclaration, List<ParsedRecordComponent> recordComponents, boolean sealedDeclaration, List<String> permittedSubclassBinaryNames)
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<ParsedClassFile>
-
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. -
binaryName
Returns the value of thebinaryNamerecord component.- Returns:
- the value of the
binaryNamerecord component
-
accessFlags
public int accessFlags()Returns the value of theaccessFlagsrecord component.- Returns:
- the value of the
accessFlagsrecord component
-
majorVersion
public int majorVersion()Returns the value of themajorVersionrecord component.- Returns:
- the value of the
majorVersionrecord component
-
minorVersion
public int minorVersion()Returns the value of theminorVersionrecord component.- Returns:
- the value of the
minorVersionrecord component
-
moduleDescriptor
public boolean moduleDescriptor()Returns the value of themoduleDescriptorrecord component.- Returns:
- the value of the
moduleDescriptorrecord component
-
resourceName
Returns the value of theresourceNamerecord component.- Returns:
- the value of the
resourceNamerecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
precedence
public int precedence()Returns the value of theprecedencerecord component.- Returns:
- the value of the
precedencerecord component
-
superclassBinaryName
-
interfaceBinaryNames
-
sourceFile
-
declaredMembers
Returns the value of thedeclaredMembersrecord component.- Returns:
- the value of the
declaredMembersrecord component
-
annotations
Returns the value of theannotationsrecord component.- Returns:
- the value of the
annotationsrecord component
-
annotationDefaults
Returns the value of theannotationDefaultsrecord component.- Returns:
- the value of the
annotationDefaultsrecord component
-
genericSignature
-
recordDeclaration
public boolean recordDeclaration()Returns the value of therecordDeclarationrecord component.- Returns:
- the value of the
recordDeclarationrecord component
-
recordComponents
Returns the value of therecordComponentsrecord component.- Returns:
- the value of the
recordComponentsrecord component
-
sealedDeclaration
public boolean sealedDeclaration()Returns the value of thesealedDeclarationrecord component.- Returns:
- the value of the
sealedDeclarationrecord component
-
permittedSubclassBinaryNames
-
nestingMetadata
Returns the value of thenestingMetadatarecord component.- Returns:
- the value of the
nestingMetadatarecord component
-
constantPoolEvidence
Returns the value of theconstantPoolEvidencerecord component.- Returns:
- the value of the
constantPoolEvidencerecord component
-
module
Returns the value of themodulerecord component.- Returns:
- the value of the
modulerecord component
-