Record Class JavaConstantEvidence
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaConstantEvidence
- All Implemented Interfaces:
Comparable<JavaConstantEvidence>
public record JavaConstantEvidence(JavaConstantEvidenceKind kind, int constantPoolIndex, String descriptor, List<JvmType> referencedTypes, Optional<JavaMethodHandle> methodHandle, Optional<JavaDynamicConstant> dynamicConstant, Optional<JavaConstantLoadSite> loadSite)
extends Record
implements Comparable<JavaConstantEvidence>
Typed, unresolved evidence for a relevant constant-pool entry.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaConstantEvidence(JavaConstantEvidenceKind kind, int constantPoolIndex, String descriptor, List<JvmType> referencedTypes, Optional<JavaMethodHandle> methodHandle, Optional<JavaDynamicConstant> dynamicConstant, Optional<JavaConstantLoadSite> loadSite) Creates an instance of aJavaConstantEvidencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(JavaConstantEvidence other) intReturns the value of theconstantPoolIndexrecord component.Returns the value of thedescriptorrecord component.Returns the value of thedynamicConstantrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.loadSite()Returns the value of theloadSiterecord component.Returns the value of themethodHandlerecord component.Returns the value of thereferencedTypesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JavaConstantEvidence
public JavaConstantEvidence(JavaConstantEvidenceKind kind, int constantPoolIndex, String descriptor, List<JvmType> referencedTypes, Optional<JavaMethodHandle> methodHandle, Optional<JavaDynamicConstant> dynamicConstant, Optional<JavaConstantLoadSite> loadSite) Creates an instance of aJavaConstantEvidencerecord class.- Parameters:
kind- the value for thekindrecord componentconstantPoolIndex- the value for theconstantPoolIndexrecord componentdescriptor- the value for thedescriptorrecord componentreferencedTypes- the value for thereferencedTypesrecord componentmethodHandle- the value for themethodHandlerecord componentdynamicConstant- the value for thedynamicConstantrecord componentloadSite- the value for theloadSiterecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<JavaConstantEvidence>
-
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
-
constantPoolIndex
public int constantPoolIndex()Returns the value of theconstantPoolIndexrecord component.- Returns:
- the value of the
constantPoolIndexrecord component
-
descriptor
Returns the value of thedescriptorrecord component.- Returns:
- the value of the
descriptorrecord component
-
referencedTypes
-
methodHandle
Returns the value of themethodHandlerecord component.- Returns:
- the value of the
methodHandlerecord component
-
dynamicConstant
Returns the value of thedynamicConstantrecord component.- Returns:
- the value of the
dynamicConstantrecord component
-
loadSite
Returns the value of theloadSiterecord component.- Returns:
- the value of the
loadSiterecord component
-