Package ortus.boxlang.runtime.types
Record Class Property
java.lang.Object
java.lang.Record
ortus.boxlang.runtime.types.Property
- Record Components:
name- The name of the propertytype- The type 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 propertydocumentation- Documentation for the propertygeneratedGetter- The generated getter FunctiongeneratedSetter- The generated setter FunctionsourceType- The source type of the propertydeclaringClass- The class that declares this property
public record Property(Key name, String type, Object defaultValue, DefaultExpression defaultExpression, IStruct annotations, IStruct documentation, Key getterName, Key setterName, UDF generatedGetter, UDF generatedSetter, BoxSourceType sourceType, Class<?> declaringClass)
extends Record
Represents a class property
-
Constructor Summary
ConstructorsConstructorDescriptionProperty(Key name, String type, Object defaultValue, DefaultExpression defaultExpression, IStruct annotations, IStruct documentation, BoxSourceType sourceType, Class<?> declaringClass) Property(Key name, String type, Object defaultValue, DefaultExpression defaultExpression, IStruct annotations, IStruct documentation, Key getterName, Key setterName, UDF generatedGetter, UDF generatedSetter, BoxSourceType sourceType, Class<?> declaringClass) Creates an instance of aPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.Class<?> Returns the value of thedeclaringClassrecord 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.Returns the value of thegeneratedGetterrecord component.Returns the value of thegeneratedSetterrecord component.getDefaultValue(IBoxContext context) Returns the value of thegetterNamerecord component.booleanfinal inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thesetterNamerecord component.Returns the value of thesourceTyperecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Property
public Property(Key name, String type, Object defaultValue, DefaultExpression defaultExpression, IStruct annotations, IStruct documentation, BoxSourceType sourceType, Class<?> declaringClass) -
Property
public Property(Key name, String type, Object defaultValue, DefaultExpression defaultExpression, IStruct annotations, IStruct documentation, Key getterName, Key setterName, UDF generatedGetter, UDF generatedSetter, BoxSourceType sourceType, Class<?> declaringClass) Creates an instance of aPropertyrecord class.- Parameters:
name- the value for thenamerecord componenttype- the value for thetyperecord componentdefaultValue- the value for thedefaultValuerecord componentdefaultExpression- the value for thedefaultExpressionrecord componentannotations- the value for theannotationsrecord componentdocumentation- the value for thedocumentationrecord componentgetterName- the value for thegetterNamerecord componentsetterName- the value for thesetterNamerecord componentgeneratedGetter- the value for thegeneratedGetterrecord componentgeneratedSetter- the value for thegeneratedSetterrecord componentsourceType- the value for thesourceTyperecord componentdeclaringClass- the value for thedeclaringClassrecord component
-
-
Method Details
-
getDefaultValue
-
getDefaultValueForMeta
-
hasDefaultValue
public boolean hasDefaultValue() -
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- 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
-
getterName
Returns the value of thegetterNamerecord component.- Returns:
- the value of the
getterNamerecord component
-
setterName
Returns the value of thesetterNamerecord component.- Returns:
- the value of the
setterNamerecord component
-
generatedGetter
Returns the value of thegeneratedGetterrecord component.- Returns:
- the value of the
generatedGetterrecord component
-
generatedSetter
Returns the value of thegeneratedSetterrecord component.- Returns:
- the value of the
generatedSetterrecord component
-
sourceType
Returns the value of thesourceTyperecord component.- Returns:
- the value of the
sourceTyperecord component
-
declaringClass
Returns the value of thedeclaringClassrecord component.- Returns:
- the value of the
declaringClassrecord component
-