Record Class JavaDynamicConstant
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaDynamicConstant
- All Implemented Interfaces:
Comparable<JavaDynamicConstant>
public record JavaDynamicConstant(String name, JvmType constantType, JavaMethodHandle bootstrapMethod, List<JavaBootstrapArgument> bootstrapArguments, int originalBootstrapArgumentCount, boolean bootstrapArgumentsTruncated)
extends Record
implements Comparable<JavaDynamicConstant>
An unresolved dynamic constant with bounded bootstrap provenance.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaDynamicConstant(String name, JvmType constantType, JavaMethodHandle bootstrapMethod, List<JavaBootstrapArgument> bootstrapArguments, int originalBootstrapArgumentCount, boolean bootstrapArgumentsTruncated) Creates an instance of aJavaDynamicConstantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebootstrapArgumentsrecord component.booleanReturns the value of thebootstrapArgumentsTruncatedrecord component.Returns the value of thebootstrapMethodrecord component.intcompareTo(JavaDynamicConstant other) Returns the value of theconstantTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.intReturns the value of theoriginalBootstrapArgumentCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MAXIMUM_BOOTSTRAP_ARGUMENTS
public static final int MAXIMUM_BOOTSTRAP_ARGUMENTS- See Also:
-
-
Constructor Details
-
JavaDynamicConstant
public JavaDynamicConstant(String name, JvmType constantType, JavaMethodHandle bootstrapMethod, List<JavaBootstrapArgument> bootstrapArguments, int originalBootstrapArgumentCount, boolean bootstrapArgumentsTruncated) Creates an instance of aJavaDynamicConstantrecord class.- Parameters:
name- the value for thenamerecord componentconstantType- the value for theconstantTyperecord componentbootstrapMethod- the value for thebootstrapMethodrecord componentbootstrapArguments- the value for thebootstrapArgumentsrecord componentoriginalBootstrapArgumentCount- the value for theoriginalBootstrapArgumentCountrecord componentbootstrapArgumentsTruncated- the value for thebootstrapArgumentsTruncatedrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<JavaDynamicConstant>
-
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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
constantType
Returns the value of theconstantTyperecord component.- Returns:
- the value of the
constantTyperecord component
-
bootstrapMethod
Returns the value of thebootstrapMethodrecord component.- Returns:
- the value of the
bootstrapMethodrecord component
-
bootstrapArguments
Returns the value of thebootstrapArgumentsrecord component.- Returns:
- the value of the
bootstrapArgumentsrecord component
-
originalBootstrapArgumentCount
public int originalBootstrapArgumentCount()Returns the value of theoriginalBootstrapArgumentCountrecord component.- Returns:
- the value of the
originalBootstrapArgumentCountrecord component
-
bootstrapArgumentsTruncated
public boolean bootstrapArgumentsTruncated()Returns the value of thebootstrapArgumentsTruncatedrecord component.- Returns:
- the value of the
bootstrapArgumentsTruncatedrecord component
-