Record Class ComponentInfo

java.lang.Object
java.lang.Record
org.apache.tika.config.loader.ComponentInfo
Record Components:
componentClass - the component's class
selfConfiguring - whether the component implements SelfConfiguring (reads its own config from ParseContext's jsonConfigs)
contextKey - the class to use as the key when adding to ParseContext, or null to auto-detect based on known interfaces
isDefault - whether this component is the default implementation for its contextKey

public record ComponentInfo(Class<?> componentClass, boolean selfConfiguring, Class<?> contextKey, boolean isDefault) extends Record
Information about a registered Tika component.
  • Constructor Details

    • ComponentInfo

      public ComponentInfo(Class<?> componentClass, boolean selfConfiguring)
      Creates a ComponentInfo with no explicit context key (auto-detect) and not default.
    • ComponentInfo

      public ComponentInfo(Class<?> componentClass, boolean selfConfiguring, Class<?> contextKey)
      Creates a ComponentInfo with explicit context key but not default.
    • ComponentInfo

      public ComponentInfo(Class<?> componentClass, boolean selfConfiguring, Class<?> contextKey, boolean isDefault)
      Creates an instance of a ComponentInfo record class.
      Parameters:
      componentClass - the value for the componentClass record component
      selfConfiguring - the value for the selfConfiguring record component
      contextKey - the value for the contextKey record component
      isDefault - the value for the isDefault record component
  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • componentClass

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

      public boolean selfConfiguring()
      Returns the value of the selfConfiguring record component.
      Returns:
      the value of the selfConfiguring record component
    • contextKey

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

      public boolean isDefault()
      Returns the value of the isDefault record component.
      Returns:
      the value of the isDefault record component