Record Class RestContext.ResolvedMixin

java.lang.Object
java.lang.Record
org.apache.juneau.rest.server.RestContext.ResolvedMixin
Record Components:
type - The mixin class.
overrides - The host-declared override annotation, or MixinAnnotation.DEFAULT for a bare class.
Enclosing class:
RestContext

public static record RestContext.ResolvedMixin(Class<?> type, Mixin overrides) extends Record
The discovery-time normalized declaration of a single mixin.

Every mixin entry — whether a bare Class<?> or a rich @Mixin — is normalized to one of these immutable carriers at discovery time, so all downstream code consumes a single shape with no bare-vs-def branching. A bare class is normalized to new ResolvedMixin(type, MixinAnnotation.DEFAULT) (i.e. @Mixin(type=X) with empty overrides), so a bare class and an empty-override @Mixin are structurally identical.

The overrides annotation is the single home for the host-declared override payload (guards, serializers, default headers, path/paths, noInherit, …). For bare classes it is MixinAnnotation.DEFAULT (all slots empty), which contributes nothing — so bare-class mixins behave exactly as they did before the @Mixin feature.

Since:
10.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResolvedMixin(Class<?> type, Mixin overrides)
    Compact canonical constructor — validates required components and null-coalesces overrides.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the overrides record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the type record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ResolvedMixin

      public ResolvedMixin(Class<?> type, Mixin overrides)
      Compact canonical constructor — validates required components and null-coalesces overrides.
  • Method Details

    • 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.
    • type

      public Class<?> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • overrides

      public Mixin overrides()
      Returns the value of the overrides record component.
      Returns:
      the value of the overrides record component