From OOModels
Code
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)▸
«}/∃»…
⊏ /Ⓣ ⊐…
…
…
⊏ Ⓣ Bases(Object current) ⊐…
⋮« boolean first = true; »…
⋮…
⋮…
⋮«∀(‖"Ⓟ/Bases"){ ⁇(‖"✦/Generalization/Interface"){ »…
⋮«if(first){first=false;»
extends «}else{»,
«}»◂‖"Ⓟ/Parent/Id"▸
⋮«}/⁇ }/∀»…
⋮…
⋮…
⋮«∀(‖"✦/CoreClasses/InterfaceBases"){»…
⋮«if(first){first=false;»
extends «}else{»,
«}»◂⊙▸
⋮«}/∀»…
⋮…
⊏ /Ⓣ ⊐…
…
…
⊏ Ⓣ 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) ⊐…
⋮«}/∀»…
⋮«}»…
⋮«}/∀»…
⋮// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
⋮// -----------------------------------------------------------------------
⊏ /Ⓣ ⊐…
…
…
⊏ Ⓣ ImplType(Object current) ⊐…
«∃(‖'✦/Logic/ImplementationType'){»◂⊙▸«}}else{{»⋖type⋗«}/∃»…
⊏ /Ⓣ ⊐…
…
…
⊏ Ⓣ 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) ⊐…
⋮«}/∀»…
⋮«}/∀»…
⋮// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
⋮// -----------------------------------------------------------------------
⊏ /Ⓣ ⊐…
…