Record Class NativeTypeInfo.Parameter
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.natives.NativeTypeInfo.Parameter
- Record Components:
type- The type of the parameter that should be exposed.name- The name of the parameter that is being targeted.description- The description of the parameter, acting as documentation.examples- A series of strings that can be used to provide examples of valid arguments for this parameter, acting as documentation; or an empty array if no examples are to be provided.
- Enclosing class:
- NativeTypeInfo
public static record NativeTypeInfo.Parameter(Class<?> type, String name, String description, String[] examples)
extends Record
Holds information relative to a specific parameter of a native method or
native constructor that is exposed to ZenCode.
- Since:
- 9.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an instance holding information relative to a parameter of a method or constructor that is exposed to ZenCode.Constructs an instance holding information relative to a parameter of a method or constructor that is exposed to ZenCode.Creates an instance of aParameterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.String[]examples()Returns the value of theexamplesrecord 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.Class<?>type()Returns the value of thetyperecord component.
-
Constructor Details
-
Parameter
Constructs an instance holding information relative to a parameter of a method or constructor that is exposed to ZenCode.The created parameter has no description.
- Parameters:
type- The type of the parameter that should be exposed.name- The name of the parameter that is being targeted.examples- A series of strings that can be used to provide examples of valid arguments for this parameter, acting as documentation; or an empty array if no examples are to be provided.- Since:
- 9.1.0
-
Parameter
Constructs an instance holding information relative to a parameter of a method or constructor that is exposed to ZenCode.The created parameter has no description and no examples.
- Parameters:
type- The type of the parameter that should be exposed.name- The name of the parameter that is being targeted.- Since:
- 9.1.0
-
Parameter
Creates an instance of aParameterrecord class.- Parameters:
type- the value for thetyperecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentexamples- the value for theexamplesrecord 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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
examples
Returns the value of theexamplesrecord component.- Returns:
- the value of the
examplesrecord component
-