Record Class SpoonUtil.FilterAdapter<T extends spoon.reflect.declaration.CtElement,U extends spoon.reflect.declaration.CtElement>
java.lang.Object
java.lang.Record
de.firemage.autograder.core.integrated.SpoonUtil.FilterAdapter<T,U>
- All Implemented Interfaces:
spoon.reflect.visitor.Filter<U>
- Enclosing class:
- SpoonUtil
public static record SpoonUtil.FilterAdapter<T extends spoon.reflect.declaration.CtElement,U extends spoon.reflect.declaration.CtElement> (spoon.reflect.visitor.Filter<T extends spoon.reflect.declaration.CtElement> filter, Class<T extends spoon.reflect.declaration.CtElement> type)
extends Record
implements spoon.reflect.visitor.Filter<U>
-
Constructor Summary
ConstructorsConstructorDescriptionFilterAdapter(spoon.reflect.visitor.Filter<T> filter, Class<T> type) Creates an instance of aFilterAdapterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.spoon.reflect.visitor.Filter<T>filter()Returns the value of thefilterrecord component.final inthashCode()Returns a hash code value for this object.booleanfinal StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FilterAdapter
Creates an instance of aFilterAdapterrecord class.- Parameters:
filter- the value for thefilterrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
matches
- Specified by:
matchesin interfacespoon.reflect.visitor.Filter<T extends spoon.reflect.declaration.CtElement>
-
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). -
filter
Returns the value of thefilterrecord component.- Returns:
- the value of the
filterrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-