Record Class InterfaceInjectionProcessor.Descriptor
java.lang.Object
java.lang.Record
net.fabricmc.loom.configuration.ifaceinject.InterfaceInjectionProcessor.Descriptor
- Record Components:
name- processor 名称fromDependencies- 是否读取编译期与运行期都存在的依赖 mod 注入的接口
- All Implemented Interfaces:
Serializable,MinecraftJarProcessor.ProcessorDescriptor<InterfaceInjectionProcessor>
- Enclosing class:
InterfaceInjectionProcessor
public static record InterfaceInjectionProcessor.Descriptor(String name, boolean fromDependencies)
extends Record
implements MinecraftJarProcessor.ProcessorDescriptor<InterfaceInjectionProcessor>
用于在执行期重建
InterfaceInjectionProcessor 的描述符.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDescriptor(String name, boolean fromDependencies) Creates an instance of aDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreateProcessor(org.gradle.api.model.ObjectFactory objectFactory) 使用给定的ObjectFactory重建 processor 实例.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefromDependenciesrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Descriptor
Creates an instance of aDescriptorrecord class.- Parameters:
name- the value for thenamerecord componentfromDependencies- the value for thefromDependenciesrecord component
-
-
Method Details
-
createProcessor
public InterfaceInjectionProcessor createProcessor(org.gradle.api.model.ObjectFactory objectFactory) Description copied from interface:MinecraftJarProcessor.ProcessorDescriptor使用给定的ObjectFactory重建 processor 实例.- Specified by:
createProcessorin interfaceMinecraftJarProcessor.ProcessorDescriptor<InterfaceInjectionProcessor>- Parameters:
objectFactory- 用于实例化带@Inject构造函数的 processor,可安全地在执行期使用- Returns:
- 重建出的 processor 实例
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
fromDependencies
public boolean fromDependencies()Returns the value of thefromDependenciesrecord component.- Returns:
- the value of the
fromDependenciesrecord component
-