Difference between revisions of "Artefact:Template/org/ooem/templates/wiml-1.0-ooem-multipart-1.0"

From OOModels
Jump to navigationJump to search
(Replacing page with '{{Metabox | Meta_Type = Type:org/oogenerator/Template/2.0 | Meta_Domain = Domain:it/development/formatting | Meta_Category = Type:org/oomodels/wiki/Template | Meta_Downlo...')
Line 9: Line 9:
==Code==
==Code==


<div class="code">
<code>
<span class="oogintro">G-2.0-java_jpp-1.0 -*- coding: utf-8; -*-</span>
Hallo!
<span class="oogfilecode">▼<span class="oogcontinuation">…</span></span>
</code>
<span class="oogfilecode">import org.oomodels.wiml.*;</span>
<span class="oogfilecode">▼</span><span class="oogcontinuation">…</span>
<span class="oogtemplatecode">⊏ signature(String wiml_code) ⊐</span><span class="oogcontinuation">…</span>
<span class="oogcode">« try { WIMLClass wc = WIMLClass.parseWIML(wiml_code); object = wc; »</span><span class="oogcontinuation">…</span>
<Class>
  <InternalModelImport>org.uml.stereotypes.*</InternalModelImport>
  <ExternalImport>java.lang.String</ExternalImport>
  <ExternalImport>java.lang.Integer</ExternalImport>
  <ExternalImport>java.lang.Object</ExternalImport>
  <ExternalImport>java.lang.Boolean</ExternalImport>
  <PrimitiveImport>int</PrimitiveImport>
  <Name><span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span></Name>
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/ModelTemplateArguments"</span>){»</span><span class="oogcontinuation">…</span>
  <TemplateArgument Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" GenericLevel="MODEL_TEMPLATE"/>
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/CodeGeneratorTemplateArguments"</span>){»</span><span class="oogcontinuation">…</span>
  <TemplateArgument Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" GenericLevel="CODE_GENERATOR_TEMPLATE"/>
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/ImplementationLanguageTemplateArguments"</span>){»</span><span class="oogcontinuation">…</span>
  <TemplateArgument Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" GenericLevel="IMPLEMENTATION_LANGUAGE_TEMPLATE"/>
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/Bases"</span>){»</span><span class="oogcontinuation">…</span>
  <Base Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>"/>
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Stereotypes"</span>){»</span><span class="oogcontinuation">…</span>
  <Stereotype><span class="oogcode">«∀(⊙){»</span><span class="oogexpression">◂⊙▸</span><span class="oogcode">«}/∀»</span></Stereotype>
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/Attributes"</span>){»</span><span class="oogcontinuation">…</span>
  <Attribute Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" Type="<span class="oogexpression">◂((String)(<span class="oogpath">‖"Ⓟ/Type"</span>)).replace("/",".")▸</span>"<span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Stereotypes"</span>){»</span> Stereotype="<span class="oogcode">«∀(⊙){»</span><span class="oogexpression">◂⊙▸</span><span class="oogcode">«}/∀»</span>"<span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">    ⋮</span><span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Extensions"</span>){»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">      ⋮</span>>
<span class="oogindentation">      ⋮</span><span class="oogtemplatecode">⊏ ➜ this.Extensions(object) ⊐</span><span class="oogcontinuation">…</span>
  </Attribute>
<span class="oogindentation">    ⋮</span><span class="oogcode">«}∨{»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">      ⋮</span>/>
<span class="oogindentation">    ⋮</span><span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/Operations"</span>){»</span><span class="oogcontinuation">…</span>
  <Operation Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" ReturnType="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/ReturnType"</span>▸</span>"<span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Stereotypes"</span>){»</span> Stereotype="<span class="oogcode">«∀(⊙){»</span><span class="oogexpression">◂⊙▸</span><span class="oogcode">«}/∀»</span>"<span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">    ⋮</span><span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Extensions"</span>){»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">      ⋮</span>>
<span class="oogindentation">      ⋮</span><span class="oogtemplatecode">⊏ ➜ this.Extensions(object) ⊐</span><span class="oogcontinuation">…</span>
  </Attribute>
<span class="oogindentation">    ⋮</span><span class="oogcode">«}∨{»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">      ⋮</span>/>
<span class="oogindentation">    ⋮</span><span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Extensions"</span>){»</span><span class="oogcontinuation">…</span>
<span class="oogindentation">    ⋮</span><span class="oogtemplatecode">⊏ ➜ this.Extensions(object) ⊐</span><span class="oogcontinuation">…</span>
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
</Class>
<span class="oogcode">« } catch (Throwable t) { »</span><span class="oogcontinuation">…</span>
ERROR: <span class="oogexpression">◂t▸</span>
<span class="oogcode">« } »</span><span class="oogcontinuation">…</span>
<span class="oogtemplatecode">⊏ Ⓣ Extensions(Object object) ⊐</span><span class="oogcontinuation">…</span>
    <Extensions>
<span class="oogindentation">    ⋮</span><span class="oogcode">«∀(⊙){»</span><span class="oogcontinuation">…</span>
      <<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>>
<span class="oogindentation">        ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/Properties"</span>){»</span><span class="oogcontinuation">…</span>
        <<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>><span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Value"</span>▸</span></<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>>
<span class="oogindentation">        ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
      </<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>>
<span class="oogindentation">    ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
    </Extensions>
<span class="oogtemplatecode">⊏ /Ⓣ ⊐</span><span class="oogcontinuation">…</span>
</div>

Revision as of 14:11, 3 April 2009

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)

OOEM main package

create new pages

Code[edit]

Hallo!