{"title":"在Java中实现UML关联:用于复杂建模概念的精简代码模式","authors":"Dominik Gessenharter","doi":"10.1145/1562100.1562104","DOIUrl":null,"url":null,"abstract":"Relationships are difficult to implement for two main reasons: Firstly, they provide a complex semantics for relating entities and secondly, relationships are not first class constructs in modern programming languages. The challenge of implementing relationships in code is to resolve the semantics of abstract model elements and turn them into references or pointers of the target language. Language extensions or libraries are often discussed as a means of facilitating the translation of relations into code. We present an approach that uses plain Java language concepts for the implementation of UML associations. We focus on symmetry of associations as well as on navigability, visibility and ownership of association ends and present a code pattern, that can easily be used for automatic code generation.","PeriodicalId":423992,"journal":{"name":"Proceedings of the Workshop on Relationships and Associations in Object-Oriented Languages","volume":"13 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2009-07-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":"{\"title\":\"Implementing UML associations in Java: a slim code pattern for a complex modeling concept\",\"authors\":\"Dominik Gessenharter\",\"doi\":\"10.1145/1562100.1562104\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Relationships are difficult to implement for two main reasons: Firstly, they provide a complex semantics for relating entities and secondly, relationships are not first class constructs in modern programming languages. The challenge of implementing relationships in code is to resolve the semantics of abstract model elements and turn them into references or pointers of the target language. Language extensions or libraries are often discussed as a means of facilitating the translation of relations into code. We present an approach that uses plain Java language concepts for the implementation of UML associations. We focus on symmetry of associations as well as on navigability, visibility and ownership of association ends and present a code pattern, that can easily be used for automatic code generation.\",\"PeriodicalId\":423992,\"journal\":{\"name\":\"Proceedings of the Workshop on Relationships and Associations in Object-Oriented Languages\",\"volume\":\"13 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2009-07-06\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"15\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the Workshop on Relationships and Associations in Object-Oriented Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1562100.1562104\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the Workshop on Relationships and Associations in Object-Oriented Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1562100.1562104","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Implementing UML associations in Java: a slim code pattern for a complex modeling concept
Relationships are difficult to implement for two main reasons: Firstly, they provide a complex semantics for relating entities and secondly, relationships are not first class constructs in modern programming languages. The challenge of implementing relationships in code is to resolve the semantics of abstract model elements and turn them into references or pointers of the target language. Language extensions or libraries are often discussed as a means of facilitating the translation of relations into code. We present an approach that uses plain Java language concepts for the implementation of UML associations. We focus on symmetry of associations as well as on navigability, visibility and ownership of association ends and present a code pattern, that can easily be used for automatic code generation.