Record Class JavaCodeAccess
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaCodeAccess
- All Implemented Interfaces:
Comparable<JavaCodeAccess>
public record JavaCodeAccess(JavaMemberSignature caller, JavaCodeAccessTarget target, JavaCodeAccessKind kind, JavaCodeAccessOpcode opcode, boolean interfaceTarget, BytecodeLocation location, CompilerArtifactProvenance artifactProvenance)
extends Record
implements Comparable<JavaCodeAccess>
One field or method bytecode access with exact caller, opcode, and location.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaCodeAccess(JavaMemberSignature caller, JavaCodeAccessTarget target, JavaCodeAccessKind kind, JavaCodeAccessOpcode opcode, boolean interfaceTarget, BytecodeLocation location) JavaCodeAccess(JavaMemberSignature caller, JavaCodeAccessTarget target, JavaCodeAccessKind kind, JavaCodeAccessOpcode opcode, boolean interfaceTarget, BytecodeLocation location, CompilerArtifactProvenance artifactProvenance) Creates an instance of aJavaCodeAccessrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theartifactProvenancerecord component.caller()Returns the value of thecallerrecord component.intcompareTo(JavaCodeAccess other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinterfaceTargetrecord component.kind()Returns the value of thekindrecord component.location()Returns the value of thelocationrecord component.opcode()Returns the value of theopcoderecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JavaCodeAccess
public JavaCodeAccess(JavaMemberSignature caller, JavaCodeAccessTarget target, JavaCodeAccessKind kind, JavaCodeAccessOpcode opcode, boolean interfaceTarget, BytecodeLocation location, CompilerArtifactProvenance artifactProvenance) Creates an instance of aJavaCodeAccessrecord class.- Parameters:
caller- the value for thecallerrecord componenttarget- the value for thetargetrecord componentkind- the value for thekindrecord componentopcode- the value for theopcoderecord componentinterfaceTarget- the value for theinterfaceTargetrecord componentlocation- the value for thelocationrecord componentartifactProvenance- the value for theartifactProvenancerecord component
-
JavaCodeAccess
public JavaCodeAccess(JavaMemberSignature caller, JavaCodeAccessTarget target, JavaCodeAccessKind kind, JavaCodeAccessOpcode opcode, boolean interfaceTarget, BytecodeLocation location)
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<JavaCodeAccess>
-
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. -
caller
Returns the value of thecallerrecord component.- Returns:
- the value of the
callerrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
opcode
Returns the value of theopcoderecord component.- Returns:
- the value of the
opcoderecord component
-
interfaceTarget
public boolean interfaceTarget()Returns the value of theinterfaceTargetrecord component.- Returns:
- the value of the
interfaceTargetrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
artifactProvenance
Returns the value of theartifactProvenancerecord component.- Returns:
- the value of the
artifactProvenancerecord component
-