Record Class RouteRecord

java.lang.Object
java.lang.Record
dev.relism.flash.ext.routeviewer.model.RouteRecord
Record Components:
event - the raw event emitted by the Flash core
abstractionChain - handler class hierarchy, outermost first, stopping before RequestHandler (e.g. ["EditPostPageHandler", "HtmlHandler"]). Empty for anonymous lambda handlers.
pointcuts - semantic annotations declared on the handler class hierarchy, used as declarative pointcut descriptors
middlewareNames - cleaned simple class names of the middleware chain, outermost first

public record RouteRecord(RouteEvent event, List<String> abstractionChain, List<String> pointcuts, List<String> middlewareNames) extends Record
Enriched snapshot of a single registered route.

Built once at registration time from a RouteEvent. All expensive operations (superclass traversal, annotation reading) happen here — never on the request hot-path.

  • Constructor Details

    • RouteRecord

      public RouteRecord(RouteEvent event, List<String> abstractionChain, List<String> pointcuts, List<String> middlewareNames)
      Creates an instance of a RouteRecord record class.
      Parameters:
      event - the value for the event record component
      abstractionChain - the value for the abstractionChain record component
      pointcuts - the value for the pointcuts record component
      middlewareNames - the value for the middlewareNames record component
  • Method Details

    • from

      public static RouteRecord from(RouteEvent event)
      Builds a RouteRecord from a raw RouteEvent.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • event

      public RouteEvent event()
      Returns the value of the event record component.
      Returns:
      the value of the event record component
    • abstractionChain

      public List<String> abstractionChain()
      Returns the value of the abstractionChain record component.
      Returns:
      the value of the abstractionChain record component
    • pointcuts

      public List<String> pointcuts()
      Returns the value of the pointcuts record component.
      Returns:
      the value of the pointcuts record component
    • middlewareNames

      public List<String> middlewareNames()
      Returns the value of the middlewareNames record component.
      Returns:
      the value of the middlewareNames record component