Package net.fabricmc.loom.util
Record Class ClosureAction<T>
java.lang.Object
java.lang.Record
net.fabricmc.loom.util.ClosureAction<T>
- All Implemented Interfaces:
org.gradle.api.Action<T>
public record ClosureAction<T>(groovy.lang.Closure closure)
extends Record
implements org.gradle.api.Action<T>
-
Constructor Summary
ConstructorsConstructorDescriptionClosureAction(groovy.lang.Closure closure) Creates an instance of aClosureActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiongroovy.lang.Closureclosure()Returns the value of theclosurerecord component.final booleanIndicates whether some other object is "equal to" this one.voidfinal inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClosureAction
public ClosureAction(groovy.lang.Closure closure) Creates an instance of aClosureActionrecord class.- Parameters:
closure- the value for theclosurerecord component
-
-
Method Details
-
execute
- Specified by:
executein interfaceorg.gradle.api.Action<T>
-
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). -
closure
public groovy.lang.Closure closure()Returns the value of theclosurerecord component.- Returns:
- the value of the
closurerecord component
-