Record Class FeatureMetadata<M>

java.lang.Object
java.lang.Record
org.wildfly.extension.mcp.api.FeatureMetadata<M>
Type Parameters:
M - The response message
All Implemented Interfaces:
Comparable<FeatureMetadata<M>>

public record FeatureMetadata<M>(FeatureMetadata.Feature feature, FeatureMethodInfo info, org.apache.sshd.common.util.io.functors.Invoker<Object,Object> invoker, ExecutionModel executionModel, Function<Object,M> resultMapper) extends Record implements Comparable<FeatureMetadata<M>>
  • Constructor Details

    • FeatureMetadata

      public FeatureMetadata(FeatureMetadata.Feature feature, FeatureMethodInfo info, org.apache.sshd.common.util.io.functors.Invoker<Object,Object> invoker, ExecutionModel executionModel, Function<Object,M> resultMapper)
      Creates an instance of a FeatureMetadata record class.
      Parameters:
      feature - the value for the feature record component
      info - the value for the info record component
      invoker - the value for the invoker record component
      executionModel - the value for the executionModel record component
      resultMapper - the value for the resultMapper record component
  • Method Details

    • compareTo

      public int compareTo(FeatureMetadata<M> o)
      Specified by:
      compareTo in interface Comparable<M>
    • asJson

      public jakarta.json.JsonObject asJson()
    • 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.
    • feature

      public FeatureMetadata.Feature feature()
      Returns the value of the feature record component.
      Returns:
      the value of the feature record component
    • info

      public FeatureMethodInfo info()
      Returns the value of the info record component.
      Returns:
      the value of the info record component
    • invoker

      public org.apache.sshd.common.util.io.functors.Invoker<Object,Object> invoker()
      Returns the value of the invoker record component.
      Returns:
      the value of the invoker record component
    • executionModel

      public ExecutionModel executionModel()
      Returns the value of the executionModel record component.
      Returns:
      the value of the executionModel record component
    • resultMapper

      public Function<Object,M> resultMapper()
      Returns the value of the resultMapper record component.
      Returns:
      the value of the resultMapper record component