When applied to a class, this decorator will override the underscore naming convention of all (previous and following) synthesizeMember() calls on the class to naming_convention.
Parameters: | naming_convention (INamingConvention) – The new naming convention. |
---|
This class decorator will override the class’s constructor by making it implicitly consume values for synthesized members and properties.
When applied to a class, this decorator adds getter/setter methods to it and overrides the constructor in order to set the default value of the member. By default, the getter will be named member_name. (Ex.: member_name = 'member' => instance.member())
By default, the setter will be named member_name with ‘set_’ prepended it to it. (Ex.: member_name = 'member' => instance.set_member(...))
By default, the private attribute containing the member’s value will be named member_name with ‘_’ prepended to it.
Naming convention can be overridden with a custom one using naming_convention decorator.
raises: DuplicateMemberNameError when two synthetic members have the same name.
Parameters: |
|
---|
When applied to a class, this decorator adds a property to it and overrides the constructor in order to set the default value of the property.
IMPORTANT: In order for this to work on python 2, you must use new objects that is to say that the class must inherit from object. By default, the private attribute containing the property’s value will be named property_name with ‘_’ prepended to it.
Naming convention can be overridden with a custom one using naming_convention decorator.
raises: DuplicateMemberNameError when two synthetic members have the same name. raises: InvalidPropertyOverrideError when there’s already a member with that name and which is not a property.
Parameters: |
|
---|
Sorry Guido, but I like CamelCase.
When applied to a class, this decorator will override the CamelCase naming convention of all (previous and following) synthesizeMember() calls on the class to namingConvention.
Parameters: | namingConvention (INamingConvention) – The new naming convention. |
---|
This class decorator will override the class’s constructor by making it implicitly consume values for synthesized members and properties.
When applied to a class, this decorator adds getter/setter methods to it and overrides the constructor in order to set the default value of the member. By default, the getter will be named memberName. (Ex.: memberName = 'member' => instance.member())
By default, the setter will be named memberName with the first letter capitalized and ‘set’ prepended it to it. (Ex.: memberName = "member" => instance.setMember(...))
By default, the private attribute containing the member’s value will be named memberName with ‘_’ prepended to it.
Naming convention can be overridden with a custom one using namingConvention decorator.
raises: DuplicateMemberNameError when two synthetic members have the same name.
Parameters: |
|
---|
When applied to a class, this decorator adds a property to it and overrides the constructor in order to set the default value of the property.
IMPORTANT: In order for this to work on python 2, you must use new objects that is to say that the class must inherit from object. By default, the private attribute containing the property’s value will be named propertyName with ‘_’ prepended to it.
Naming convention can be overridden with a custom one using namingConvention decorator.
raises: DuplicateMemberNameError when two synthetic members have the same name. raises: InvalidPropertyOverrideError when there’s already a member with that name and which is not a property.
Parameters: |
|
---|