Package org.apache.tika.config.loader
Record Class ComponentInfo
java.lang.Object
java.lang.Record
org.apache.tika.config.loader.ComponentInfo
- Record Components:
componentClass- the component's classselfConfiguring- 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 interfacesisDefault- 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 Summary
ConstructorsConstructorDescriptionComponentInfo(Class<?> componentClass, boolean selfConfiguring) Creates a ComponentInfo with no explicit context key (auto-detect) and not default.ComponentInfo(Class<?> componentClass, boolean selfConfiguring, Class<?> contextKey) Creates a ComponentInfo with explicit context key but not default.ComponentInfo(Class<?> componentClass, boolean selfConfiguring, Class<?> contextKey, boolean isDefault) Creates an instance of aComponentInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>Returns the value of thecomponentClassrecord component.Class<?>Returns the value of thecontextKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisDefaultrecord component.booleanReturns the value of theselfConfiguringrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ComponentInfo
Creates a ComponentInfo with no explicit context key (auto-detect) and not default. -
ComponentInfo
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 aComponentInforecord class.- Parameters:
componentClass- the value for thecomponentClassrecord componentselfConfiguring- the value for theselfConfiguringrecord componentcontextKey- the value for thecontextKeyrecord componentisDefault- the value for theisDefaultrecord component
-
-
Method Details
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
componentClass
Returns the value of thecomponentClassrecord component.- Returns:
- the value of the
componentClassrecord component
-
selfConfiguring
public boolean selfConfiguring()Returns the value of theselfConfiguringrecord component.- Returns:
- the value of the
selfConfiguringrecord component
-
contextKey
Returns the value of thecontextKeyrecord component.- Returns:
- the value of the
contextKeyrecord component
-
isDefault
public boolean isDefault()Returns the value of theisDefaultrecord component.- Returns:
- the value of the
isDefaultrecord component
-