<s> from . i_member_delegate import IMemberDelegate <EOL> from . i_naming_convention import INamingConvention <EOL> from . synthetic_class_controller import SyntheticClassController <EOL> from . synthetic_member import SyntheticMember <EOL> from contracts import contract , new_contract <EOL> new_contract ( '<STR_LIT>' , IMemberDelegate ) <EOL> new_contract ( '<STR_LIT>' , INamingConvention ) <EOL> new_contract ( '<STR_LIT>' , SyntheticMember ) <EOL> class SyntheticDecoratorFactory : <EOL> @ contract <EOL> def syntheticMemberDecorator ( self , <EOL> memberName , <EOL> defaultValue , <EOL> contract , <EOL> readOnly , <EOL> privateMemberName , <EOL> memberDelegate ) : <EOL> """<STR_LIT>""" <EOL> def decoratorFunction ( cls ) : <EOL> syntheticMember = SyntheticMember ( memberName , <EOL> defaultValue , <EOL> contract , <EOL> readOnly , <EOL> privateMemberName , <EOL> memberDelegate = memberDelegate ) <EOL> SyntheticClassController ( cls ) . addSyntheticMember ( syntheticMember ) <EOL> return cls <EOL> return decoratorFunction <EOL> def syntheticConstructorDecorator ( self ) : <EOL> def functionWrapper ( cls ) : <EOL> SyntheticClassController ( cls ) . synthesizeConstructor ( ) <EOL> return cls <EOL> return functionWrapper <EOL> def namingConventionDecorator ( self , namingConvention ) : <EOL> """<STR_LIT>""" <EOL> def decoratorFunction ( cls ) : <EOL> SyntheticClassController ( cls ) . setNamingConvention ( namingConvention ) <EOL> return cls <EOL> return decoratorFunction </s>
