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 Details

  • Method Details

    • compareTo

      public int compareTo(ParsedClassFile other)
      Specified by:
      compareTo in interface Comparable<ParsedClassFile>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • binaryName

      public String binaryName()
      Returns the value of the binaryName record component.
      Returns:
      the value of the binaryName record component
    • accessFlags

      public int accessFlags()
      Returns the value of the accessFlags record component.
      Returns:
      the value of the accessFlags record component
    • majorVersion

      public int majorVersion()
      Returns the value of the majorVersion record component.
      Returns:
      the value of the majorVersion record component
    • minorVersion

      public int minorVersion()
      Returns the value of the minorVersion record component.
      Returns:
      the value of the minorVersion record component
    • moduleDescriptor

      public boolean moduleDescriptor()
      Returns the value of the moduleDescriptor record component.
      Returns:
      the value of the moduleDescriptor record component
    • resourceName

      public String resourceName()
      Returns the value of the resourceName record component.
      Returns:
      the value of the resourceName record component
    • origin

      public ClassFileOrigin origin()
      Returns the value of the origin record component.
      Returns:
      the value of the origin record component
    • precedence

      public int precedence()
      Returns the value of the precedence record component.
      Returns:
      the value of the precedence record component
    • superclassBinaryName

      public Optional<String> superclassBinaryName()
      Returns the value of the superclassBinaryName record component.
      Returns:
      the value of the superclassBinaryName record component
    • interfaceBinaryNames

      public List<String> interfaceBinaryNames()
      Returns the value of the interfaceBinaryNames record component.
      Returns:
      the value of the interfaceBinaryNames record component
    • sourceFile

      public Optional<String> sourceFile()
      Returns the value of the sourceFile record component.
      Returns:
      the value of the sourceFile record component
    • declaredMembers

      public List<ParsedMember> declaredMembers()
      Returns the value of the declaredMembers record component.
      Returns:
      the value of the declaredMembers record component
    • annotations

      public List<ParsedAnnotationOccurrence> annotations()
      Returns the value of the annotations record component.
      Returns:
      the value of the annotations record component
    • annotationDefaults

      public List<ParsedAnnotationDefault> annotationDefaults()
      Returns the value of the annotationDefaults record component.
      Returns:
      the value of the annotationDefaults record component
    • genericSignature

      public Optional<String> genericSignature()
      Returns the value of the genericSignature record component.
      Returns:
      the value of the genericSignature record component
    • recordDeclaration

      public boolean recordDeclaration()
      Returns the value of the recordDeclaration record component.
      Returns:
      the value of the recordDeclaration record component
    • recordComponents

      public List<ParsedRecordComponent> recordComponents()
      Returns the value of the recordComponents record component.
      Returns:
      the value of the recordComponents record component
    • sealedDeclaration

      public boolean sealedDeclaration()
      Returns the value of the sealedDeclaration record component.
      Returns:
      the value of the sealedDeclaration record component
    • permittedSubclassBinaryNames

      public List<String> permittedSubclassBinaryNames()
      Returns the value of the permittedSubclassBinaryNames record component.
      Returns:
      the value of the permittedSubclassBinaryNames record component
    • nestingMetadata

      public ParsedNestingMetadata nestingMetadata()
      Returns the value of the nestingMetadata record component.
      Returns:
      the value of the nestingMetadata record component
    • constantPoolEvidence

      public ParsedConstantPoolEvidence constantPoolEvidence()
      Returns the value of the constantPoolEvidence record component.
      Returns:
      the value of the constantPoolEvidence record component
    • module

      public Optional<ParsedModuleDescriptor> module()
      Returns the value of the module record component.
      Returns:
      the value of the module record component