Record Class HandlerJSentinelMetadata
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.rest.openapi.HandlerJSentinelMetadata
- Record Components:
handlerClassName- fully qualified handler class name; non-blankclassLevel- class-level requirements (apply to every method on the class); non-null, immutablemethods- per-method requirements keyed on method name; non-null, immutable, contains nonullkeys or values
@ExperimentalJSentinelApi
public record HandlerJSentinelMetadata(String handlerClassName, List<JSentinelRequirement> classLevel, Map<String, List<JSentinelRequirement>> methods)
extends Record
Result of running
OpenApiJSentinelMetadataGenerator.generate(Class) on a handler
class. Carries the class-level and per-method
JSentinelRequirements the generator extracted.
Apps building an OpenAPI document combine
classLevel() with each entry of methods() for
the corresponding operation — the runtime evaluator AND-s them,
so the OpenAPI exporter should reflect that.
-
Constructor Summary
ConstructorsConstructorDescriptionHandlerJSentinelMetadata(String handlerClassName, List<JSentinelRequirement> classLevel, Map<String, List<JSentinelRequirement>> methods) Validates the components and freezes the collections. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassLevelrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thehandlerClassNamerecord component.final inthashCode()Returns a hash code value for this object.booleanisEmpty()methods()Returns the value of themethodsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HandlerJSentinelMetadata
public HandlerJSentinelMetadata(String handlerClassName, List<JSentinelRequirement> classLevel, Map<String, List<JSentinelRequirement>> methods) Validates the components and freezes the collections.
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Returns:
truewhen there is no class-level requirement and no method-level requirement
-
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). -
handlerClassName
Returns the value of thehandlerClassNamerecord component.- Returns:
- the value of the
handlerClassNamerecord component
-
classLevel
Returns the value of theclassLevelrecord component.- Returns:
- the value of the
classLevelrecord component
-
methods
-