Record Class AnnotationAccessEvaluatorPair<T extends Annotation>
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.authorization.impl.AnnotationAccessEvaluatorPair<T>
- Type Parameters:
T- the annotation type- Record Components:
annotation- the restriction annotation instanceevaluatorClass- the evaluator class to instantiate
public record AnnotationAccessEvaluatorPair<T extends Annotation>(T extends Annotation annotation, Class<?> evaluatorClass)
extends Record
Pairs a restriction annotation instance with the
evaluator class declared via
JSentinelAnnotation.-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationAccessEvaluatorPair(T annotation, Class<?> evaluatorClass) Creates an instance of aAnnotationAccessEvaluatorPairrecord class. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends AccessEvaluator<T>> Compatibility accessor for Vaadin-orientedAccessEvaluators.Returns the value of theannotationrecord component.final booleanIndicates whether some other object is "equal to" this one.Class<?> Returns the value of theevaluatorClassrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AnnotationAccessEvaluatorPair
Creates an instance of aAnnotationAccessEvaluatorPairrecord class.- Parameters:
annotation- the value for theannotationrecord componentevaluatorClass- the value for theevaluatorClassrecord component
-
-
Method Details
-
accessEvaluatorClass
Compatibility accessor for Vaadin-orientedAccessEvaluators.- Returns:
- evaluator class cast to the legacy access evaluator type
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
annotation
Returns the value of theannotationrecord component.- Returns:
- the value of the
annotationrecord component
-
evaluatorClass
Returns the value of theevaluatorClassrecord component.- Returns:
- the value of the
evaluatorClassrecord component
-