@groovy.transform.CompileStatic class PropertyDefinition extends AbstractMemberDefinition
Represents a property definition for domain class code generation. Properties in Groovy have no access modifier and auto-generate getter/setter methods.
| Modifiers | Name | Description |
|---|---|---|
static class |
PropertyDefinition.Builder |
Builder pattern for creating PropertyDefinition instances. |
| Properties inherited from class | Properties |
|---|---|
class AbstractMemberDefinition |
BUILTIN_TYPES, blank, constraintStyle, maxSize, minSize, name, nullable, type |
| Constructor and description |
|---|
PropertyDefinition() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static PropertyDefinition.Builder |
builder() |
|
protected java.lang.String |
getMemberType() |
|
static PropertyDefinition |
parse(java.lang.String propertySpec)Parses a property specification string like "title:String" into a PropertyDefinition. |
|
java.lang.String |
toDeclaration()Generates the property declaration line for the domain class. |
| Methods inherited from class | Name |
|---|---|
class AbstractMemberDefinition |
getMemberType, getRequiredImports, isBuiltinType, isValidTypeName, toAnnotations, toConstraintLine, toDeclaration, usesGrailsConstraints, usesJakartaAnnotations, validate |
Parses a property specification string like "title:String" into a PropertyDefinition.
propertySpec - the property specification (e.g., "title:String" or just "title")Generates the property declaration line for the domain class.