Package ortus.boxlang.runtime.types
Record Class Argument
java.lang.Object
java.lang.Record
ortus.boxlang.runtime.types.Argument
- Record Components:
required- Whether the argument is requiredtype- The type of the argumentname- The name of the argumentdefaultValue- The default value of the argumentdefaultExpression- The default value of the argument as a Lambda to be evaluated at runtimeannotations- Annotations for the argumentdocumentation- Documentation for the argument
- All Implemented Interfaces:
Validatable
public record Argument(boolean required, String type, Key name, Object defaultValue, Argument.DefaultExpression defaultExpression, IStruct annotations, IStruct documentation, Set<Validator> validators)
extends Record
implements Validatable
Represents an argument to a function or BIF
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionArgument(boolean required, String type, Key name, Object defaultValue, Argument.DefaultExpression defaultExpression, IStruct annotations, IStruct documentation) Argument(boolean required, String type, Key name, Object defaultValue, Argument.DefaultExpression defaultExpression, IStruct annotations, IStruct documentation, Set<Validator> validators) Creates an instance of aArgumentrecord class.Argument(boolean required, String type, Key name, Object defaultValue, IStruct annotations, Set<Validator> validators) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.Returns the value of thedefaultExpressionrecord component.Returns the value of thedefaultValuerecord component.Returns the value of thedocumentationrecord component.final booleanIndicates whether some other object is "equal to" this one.getDefaultValue(IBoxContext context) booleanfinal inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleanrequired()Returns the value of therequiredrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Returns the value of thevalidatorsrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ortus.boxlang.runtime.validation.Validatable
validate
-
Field Details
-
ANY
- See Also:
-
ARRAY
- See Also:
-
BOOLEAN
- See Also:
-
DATE
- See Also:
-
DATETIME
- See Also:
-
DOUBLE
- See Also:
-
FILE
- See Also:
-
FUNCTION
- See Also:
-
INTEGER
- See Also:
-
LIST
- See Also:
-
LONG
- See Also:
-
MODIFIABLE_ARRAY
- See Also:
-
MODIFIABLE_STRUCT
- See Also:
-
MODIFIABLE_QUERY
- See Also:
-
NUMERIC
- See Also:
-
QUERY
- See Also:
-
STRING
- See Also:
-
STRUCT
- See Also:
-
STRUCT_LOOSE
- See Also:
-
UDF
- See Also:
-
CLOSURE
- See Also:
-
LAMBDA
- See Also:
-
XML
- See Also:
-
-
Constructor Details
-
Argument
-
Argument
-
Argument
-
Argument
-
Argument
-
Argument
-
Argument
-
Argument
-
Argument
-
Argument
public Argument(boolean required, String type, Key name, Object defaultValue, Argument.DefaultExpression defaultExpression, IStruct annotations, IStruct documentation, Set<Validator> validators) Creates an instance of aArgumentrecord class.- Parameters:
required- the value for therequiredrecord componenttype- the value for thetyperecord componentname- the value for thenamerecord componentdefaultValue- the value for thedefaultValuerecord componentdefaultExpression- the value for thedefaultExpressionrecord componentannotations- the value for theannotationsrecord componentdocumentation- the value for thedocumentationrecord componentvalidators- the value for thevalidatorsrecord component
-
-
Method Details
-
getDefaultValue
-
hasDefaultValue
public boolean hasDefaultValue() -
implementsSignature
-
signatureAsString
-
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 '=='. -
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceValidatable- Returns:
- the value of the
typerecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceValidatable- Returns:
- the value of the
namerecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Specified by:
defaultValuein interfaceValidatable- Returns:
- the value of the
defaultValuerecord component
-
defaultExpression
Returns the value of thedefaultExpressionrecord component.- Returns:
- the value of the
defaultExpressionrecord component
-
annotations
Returns the value of theannotationsrecord component.- Returns:
- the value of the
annotationsrecord component
-
documentation
Returns the value of thedocumentationrecord component.- Returns:
- the value of the
documentationrecord component
-
validators
Returns the value of thevalidatorsrecord component.- Specified by:
validatorsin interfaceValidatable- Returns:
- the value of the
validatorsrecord component
-