Record Class ScriptDiscoveryConfiguration
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.zencode.scriptrun.ScriptDiscoveryConfiguration
- Record Components:
suspiciousNamesBehavior- The behavior to use whenever a file with a suspicious name is encountered during discovery.retainer- TheScriptDiscoveryConfiguration.DiscoveryRetainerto invoke to store the list of discovered files.
public record ScriptDiscoveryConfiguration(ScriptDiscoveryConfiguration.SuspiciousNamesBehavior suspiciousNamesBehavior, ScriptDiscoveryConfiguration.DiscoveryRetainer retainer)
extends Record
Holds the configuration that should be followed during automatic script discovery for the creation of a
IScriptRun.- Since:
- 10.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents a callback that can be used to retain the results of the discovery process.static enumSpecifies the behavior to be used when a file with a suspicious name is encountered. -
Constructor Summary
ConstructorsConstructorDescriptionScriptDiscoveryConfiguration(ScriptDiscoveryConfiguration.SuspiciousNamesBehavior suspiciousNamesBehavior) Creates aScriptDiscoveryConfigurationwith the given behavior and a no-opScriptDiscoveryConfiguration.DiscoveryRetainer.ScriptDiscoveryConfiguration(ScriptDiscoveryConfiguration.SuspiciousNamesBehavior suspiciousNamesBehavior, ScriptDiscoveryConfiguration.DiscoveryRetainer retainer) Creates an instance of aScriptDiscoveryConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.retainer()Returns the value of theretainerrecord component.Returns the value of thesuspiciousNamesBehaviorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScriptDiscoveryConfiguration
public ScriptDiscoveryConfiguration(ScriptDiscoveryConfiguration.SuspiciousNamesBehavior suspiciousNamesBehavior) Creates aScriptDiscoveryConfigurationwith the given behavior and a no-opScriptDiscoveryConfiguration.DiscoveryRetainer.- Parameters:
suspiciousNamesBehavior- The behavior to use whenever a file with a suspicious name is encountered during discovery.- Since:
- 10.1.0
-
ScriptDiscoveryConfiguration
public ScriptDiscoveryConfiguration(ScriptDiscoveryConfiguration.SuspiciousNamesBehavior suspiciousNamesBehavior, ScriptDiscoveryConfiguration.DiscoveryRetainer retainer) Creates an instance of aScriptDiscoveryConfigurationrecord class.- Parameters:
suspiciousNamesBehavior- the value for thesuspiciousNamesBehaviorrecord componentretainer- the value for theretainerrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
suspiciousNamesBehavior
Returns the value of thesuspiciousNamesBehaviorrecord component.- Returns:
- the value of the
suspiciousNamesBehaviorrecord component
-
retainer
Returns the value of theretainerrecord component.- Returns:
- the value of the
retainerrecord component
-