Difference between revisions of "Artefact:Template/org/oogenerator/examples/samples/Example9999 JavaInterface"
From OOModels
< Artefact:Template | org | oogenerator | examples | samples
Jump to navigationJump to search
AndreasLeue (talk | contribs) (New page: {{Metabox | Meta_Type = Type:org/oogenerator/Template/2.0 | Meta_Domain = Domain:it/development/formatting | Meta_Category = Type:org/oomodels/wiki/Template | Meta_Download = true | ...) |
AndreasLeue (talk | contribs) m (Artefact:Template/org/oogenerator/examples/Example9999 JavaInterface moved to Artefact:Template/org/oogenerator/examples/samples/Example9999 JavaInterface) |
Latest revision as of 16:05, 17 July 2008
Classification | |
---|---|
Type | Type:org/oogenerator/Template/2.0 |
Domain | Domain:it/development/formatting |
Category | Type:org/oomodels/wiki/Template |
Maturity | final |
More | |
Download Code | |
Namespace (more) | |
OOGenerator main package | |
create new pages |
Code[edit]
G-2.0-uml-1.0 -*- coding: utf-8; -*- ⊏ ➜ this.TemplateDeclaration(current) ⊐… package ◂‖"Ⓟ/ModelParent/Path"▸; ⊏ ➜ this.Imports(current) ⊐… ⊏ ➜ this.Annotations(current) ⊐… public interface ◂‖"Ⓟ/Name"▸ … ⋮⊏ ➜ this.Bases(current) ⊐… { ⋮«¶(" ")»… ⋮⊏ ➜ this.Attributes(current) ⊐… ⋮⊏ ➜ this.Operations(current) ⊐… ⋮«∀(-t:‖"✦/Interaction/Traits"){»… ⋮⊏ ➜ ("com.sphenon.ad.adcore.model.templates.InteractionTraitInterface_"+t)(uml_class) ⊐… ⋮«}/∃»… ⋮«/¶»… } «∃(-code:‖"✦/LogicImplementation/InterfaceBody"){»◂eval(context, code, current)▸«}/∃»… ⊰ ====================================================================================== ⊱… ⊰ ====================================================================================== ⊱… ⊰ ====================================================================================== ⊱… ⊏ Ⓣ Imports(Object current) ⊐… import com.sphenon.basics.context.*; import com.sphenon.basics.tracking.annotations.*; «∀(parentpackage:‖"Ⓟ/ModelParent/Packages"){»… «⁇(‖"✦/Dependencies/IsEnclosed"){»… import ◂‖[parentpackage]"Ⓟ/Path"▸.*; «}/⁇»… «}/∀»… «∀(‖"Ⓟ/ModelParent/ExternalImports"){»… import ◂⊙▸; «}/∀»… «∀(‖"Ⓟ/ModelParent/ModelImports"){»… import ◂⊙▸; «}/∀»… «∀(‖"Ⓟ/ExternalImports"){»… import ◂⊙▸; «}/∀»… «∀(‖"Ⓟ/ModelImports"){»… import ◂⊙▸; «}/∀»… «∀(‖"✦/Dependencies/Imports"){»… import ◂⊙▸; «}/∀»… ⊏ /Ⓣ ⊐… ⊰ ====================================================================================== ⊱… ⊏ Ⓣ TemplateDeclaration(Object current) ⊐… « ⇾(⊙,UMLClassTemplate) { ¬∅(‖"Ⓟ/TemplateParameters") { »… template⋜«∀(⊙){»«¬➀{»,«}/¬➀»◂⊙▸«}/∀»⋝ « }/¬∅ }/⇾ »… ⊏ /Ⓣ ⊐… ⊰ ====================================================================================== ⊱… ⊏ Ⓣ Annotations(Object current) ⊐… « Object uml_element = current; »… @ArtefactOrigin({"com.sphenon.ad.adcore.model.templates.JavaInterface.template"«∃(‖"Accessory/ArtefactOrigin"){»«∀(‖"Ⓟ/Track"){»,"◂⊙▸"«}/∀»«}/∃»}) ⊏ ➜ this.XModelAnnotations(current, "Interface") ⊐… ⊏ /Ⓣ ⊐… ⊰ ====================================================================================== ⊱… ⊏ Ⓣ XModelAnnotations(Object current, String property) ⊐… «∃(-code:‖'✦/Annotations/" + property + "'){»… ◂eval(context, code, current)▸ «}/∃»… ⊏ /Ⓣ ⊐… ⊰ ====================================================================================== ⊱… ⊰ creates the "extends ...." List of the interface ⊱… ⊏ Ⓣ Bases(Object current) ⊐… ⋮« boolean first = true; »… ⋮⊰ ------------------------------------------------------------------------------ ⊱… ⋮⊰ list of all Bases directly specfied in the UMLModel with an additional check if it's not disabled via XModel property ⊱… ⋮«∀(‖"Ⓟ/Bases"){ ⁇(‖"✦/Generalization/Interface"){ »… ⋮«if(first){first=false;» extends «}else{», «}»◂‖"Ⓟ/Parent/Id"▸ ⋮«}/⁇ }/∀»… ⋮⊰ ------------------------------------------------------------------------------ ⊱… ⋮⊰ list of all Bases implicitly specfied via a Stereotype ⊱… ⋮«∀(‖"✦/CoreClasses/InterfaceBases"){»… ⋮«if(first){first=false;» extends «}else{», «}»◂⊙▸ ⋮«}/∀»… ⋮⊰ ------------------------------------------------------------------------------ ⊱… ⊏ /Ⓣ ⊐… ⊰ ====================================================================================== ⊱… ⊰ Attributes ⊱… ⊏ Ⓣ Attributes(Object current) ⊐… ⋮// ----------------------------------------------------------------------- ⋮// -- Attributes --------------------------------------------------------- ⋮«∀(a:‖"Ⓟ/Attributes"){»… ⋮« if ("public".equals(‖"Ⓟ/Visibility")) { »… ⋮// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ⋮⊏ ➜ this.XModelAnnotations(a, "InterfaceGet") ⊐… ⋮◂‖"Ⓟ/Visibility"▸ ⋖type⋗ get◂‖"Ⓟ/Name"▸ (CallContext context); ⋮«¬⁇(-:‖"Ⓟ/IsReadOnly"){»… ⋮«∃(-:‖"✦/Logic/DefaultValue"){»… ⋮⊏ ➜ this.XModelAnnotations(a, "InterfaceDefault") ⊐… ⋮◂‖"Ⓟ/Visibility"▸ ⊏➜this.ImplType(a)⊐ default◂‖"Ⓟ/Name"▸ (CallContext context); ⋮«}/∃»… ⋮⊏ ➜ this.XModelAnnotations(a, "InterfaceSet") ⊐… ⋮◂‖"Ⓟ/Visibility"▸ void set◂‖"Ⓟ/Name"▸ (CallContext context, ⊏➜this.ImplType(a)⊐ ◂‖"Ⓟ/Name"⌘MC/LCU/JAVAID▸); ⋮«}/¬⁇»… ⋮«∀(-t:‖"✦/Interaction/Traits"){»… ⋮⊏ ➜ ("com.sphenon.ad.adcore.model.templates.InteractionTraitInterfaceAttribute_"+t)(a) ⊐… ⋮«}/∀»… ⋮«}»… ⋮«}/∀»… ⋮// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ⋮// ----------------------------------------------------------------------- ⊏ /Ⓣ ⊐… ⊰ ====================================================================================== ⊱… ⊰ chooses either ImplementationType, if given, otherwise Type ⊱… ⊏ Ⓣ ImplType(Object current) ⊐… «∃(‖'✦/Logic/ImplementationType'){»◂⊙▸«}}else{{»⋖type⋗«}/∃»… ⊏ /Ⓣ ⊐… ⊰ ====================================================================================== ⊱… ⊰ Operations ⊱… ⊏ Ⓣ Operations(Object current) ⊐… ⋮// ----------------------------------------------------------------------- ⋮// -- Operations --------------------------------------------------------- ⋮«∀(o:‖"Ⓟ/Operations"){»… ⋮// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ⋮⊏ ➜ this.XModelAnnotations(o, "InterfaceOperation") ⊐… ⋮public ⋖type⋗ ◂‖"Ⓟ/Name"▸ (CallContext context«∀(‖"Ⓟ/Signature/Arguments"){», ⋖type⋗ ◂‖"Ⓟ/Name"⌘MC/LCU/JAVAID▸«}/∀»); ⋮«∀(-t:‖"✦/Interaction/Traits"){»… ⋮⊏ ➜ ("com.sphenon.ad.adcore.model.templates.InteractionTraitInterfaceAttribute_"+t)(o) ⊐… ⋮«}/∀»… ⋮«}/∀»… ⋮// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ⋮// ----------------------------------------------------------------------- ⊏ /Ⓣ ⊐… ⊰ ====================================================================================== ⊱…