Record Class UseEnumValues.CtEnumFieldRead
java.lang.Object
java.lang.Record
de.firemage.autograder.core.check.api.UseEnumValues.CtEnumFieldRead
- Enclosing class:
- UseEnumValues
public static record UseEnumValues.CtEnumFieldRead(spoon.reflect.declaration.CtEnum<?> ctEnum, spoon.reflect.declaration.CtEnumValue<?> ctEnumValue)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCtEnumFieldRead(spoon.reflect.declaration.CtEnum<?> ctEnum, spoon.reflect.declaration.CtEnumValue<?> ctEnumValue) Creates an instance of aCtEnumFieldReadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionspoon.reflect.declaration.CtEnum<?>ctEnum()Returns the value of thectEnumrecord component.spoon.reflect.declaration.CtEnumValue<?>Returns the value of thectEnumValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.of(spoon.reflect.code.CtExpression<?> ctExpression) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CtEnumFieldRead
public CtEnumFieldRead(spoon.reflect.declaration.CtEnum<?> ctEnum, spoon.reflect.declaration.CtEnumValue<?> ctEnumValue) Creates an instance of aCtEnumFieldReadrecord class.- Parameters:
ctEnum- the value for thectEnumrecord componentctEnumValue- the value for thectEnumValuerecord component
-
-
Method Details
-
of
public static Optional<UseEnumValues.CtEnumFieldRead> of(spoon.reflect.code.CtExpression<?> ctExpression) -
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
ctEnum
public spoon.reflect.declaration.CtEnum<?> ctEnum()Returns the value of thectEnumrecord component.- Returns:
- the value of the
ctEnumrecord component
-
ctEnumValue
public spoon.reflect.declaration.CtEnumValue<?> ctEnumValue()Returns the value of thectEnumValuerecord component.- Returns:
- the value of the
ctEnumValuerecord component
-