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 String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static 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 aArgument
record class.Argument
(boolean required, String type, Key name, Object defaultValue, IStruct annotations, Set<Validator> validators) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotations
record component.Returns the value of thedefaultExpression
record component.Returns the value of thedefaultValue
record component.Returns the value of thedocumentation
record component.final boolean
Indicates whether some other object is "equal to" this one.getDefaultValue
(IBoxContext context) boolean
final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.boolean
required()
Returns the value of therequired
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.Returns the value of thevalidators
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 aArgument
record class.- Parameters:
required
- the value for therequired
record componenttype
- the value for thetype
record componentname
- the value for thename
record componentdefaultValue
- the value for thedefaultValue
record componentdefaultExpression
- the value for thedefaultExpression
record componentannotations
- the value for theannotations
record componentdocumentation
- the value for thedocumentation
record componentvalidators
- the value for thevalidators
record 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 therequired
record component.- Returns:
- the value of the
required
record component
-
type
Returns the value of thetype
record component.- Specified by:
type
in interfaceValidatable
- Returns:
- the value of the
type
record component
-
name
Returns the value of thename
record component.- Specified by:
name
in interfaceValidatable
- Returns:
- the value of the
name
record component
-
defaultValue
Returns the value of thedefaultValue
record component.- Specified by:
defaultValue
in interfaceValidatable
- Returns:
- the value of the
defaultValue
record component
-
defaultExpression
Returns the value of thedefaultExpression
record component.- Returns:
- the value of the
defaultExpression
record component
-
annotations
Returns the value of theannotations
record component.- Returns:
- the value of the
annotations
record component
-
documentation
Returns the value of thedocumentation
record component.- Returns:
- the value of the
documentation
record component
-
validators
Returns the value of thevalidators
record component.- Specified by:
validators
in interfaceValidatable
- Returns:
- the value of the
validators
record component
-