Record Class EnumPrototype
java.lang.Object
java.lang.Record
net.neoforged.fml.common.asm.enumextension.EnumPrototype
- All Implemented Interfaces:
Comparable<EnumPrototype>
record EnumPrototype(String owningMod, String enumName, String fieldName, String ctorDesc, String fullCtorDesc, EnumParameters ctorParams)
extends Record
implements Comparable<EnumPrototype>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thectorDescrecord component.private final EnumParametersThe field for thectorParamsrecord component.private static final Stringprivate final StringThe field for theenumNamerecord component.private final StringThe field for thefieldNamerecord component.private final StringThe field for thefullCtorDescrecord component.private static final Gsonprivate final StringThe field for theowningModrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEnumPrototype(String owningMod, String enumName, String fieldName, String ctorDesc, String fullCtorDesc, EnumParameters ctorParams) Creates an instance of aEnumPrototyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(EnumPrototype other) ctorDesc()Returns the value of thectorDescrecord component.Returns the value of thectorParamsrecord component.enumName()Returns the value of theenumNamerecord component.final booleanIndicates whether some other object is "equal to" this one.private static voidReturns the value of thefieldNamerecord component.Returns the value of thefullCtorDescrecord component.final inthashCode()Returns a hash code value for this object.private static booleanisValidClassDescriptor(String desc) private static boolean(package private) static List<EnumPrototype> private static EnumParametersloadConstantParameters(IModInfo mod, String enumName, String fieldName, String ctorDesc, JsonArray obj) Returns the value of theowningModrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
owningMod
The field for theowningModrecord component. -
enumName
The field for theenumNamerecord component. -
fieldName
The field for thefieldNamerecord component. -
ctorDesc
The field for thectorDescrecord component. -
fullCtorDesc
The field for thefullCtorDescrecord component. -
ctorParams
The field for thectorParamsrecord component. -
ENUM_CTOR_BASE_DESC
- See Also:
-
GSON
-
-
Constructor Details
-
EnumPrototype
EnumPrototype(String owningMod, String enumName, String fieldName, String ctorDesc, String fullCtorDesc, EnumParameters ctorParams) Creates an instance of aEnumPrototyperecord class.- Parameters:
owningMod- the value for theowningModrecord componentenumName- the value for theenumNamerecord componentfieldName- the value for thefieldNamerecord componentctorDesc- the value for thectorDescrecord componentfullCtorDesc- the value for thefullCtorDescrecord componentctorParams- the value for thectorParamsrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<EnumPrototype>
-
load
-
loadConstantParameters
-
isValidClassDescriptor
-
isValidConstructorDescriptor
-
error
-
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). -
owningMod
Returns the value of theowningModrecord component.- Returns:
- the value of the
owningModrecord component
-
enumName
Returns the value of theenumNamerecord component.- Returns:
- the value of the
enumNamerecord component
-
fieldName
Returns the value of thefieldNamerecord component.- Returns:
- the value of the
fieldNamerecord component
-
ctorDesc
Returns the value of thectorDescrecord component.- Returns:
- the value of the
ctorDescrecord component
-
fullCtorDesc
Returns the value of thefullCtorDescrecord component.- Returns:
- the value of the
fullCtorDescrecord component
-
ctorParams
Returns the value of thectorParamsrecord component.- Returns:
- the value of the
ctorParamsrecord component
-