Author Topic: A Java Interface Future<V>  (Read 1446 times)

RoyEL1

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
A Java Interface Future<V>
« on: March 03, 2015, 09:39:36 am »
Is there a way to show the subject, which is a Java Interface, that is paramertized? If so how?

qwerty

  • EA Guru
  • *****
  • Posts: 9434
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: A Java Interface Future<V>
« Reply #1 on: March 03, 2015, 09:53:18 am »
You could use this SQL to list all of them:

Code: [Select]
SELECT ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE, t_object.Name as Name FROM t_object, t_xref WHERE GenType = 'Java' AND Object_Type = 'Interface' AND t_object.ea_guid = t_xref.Client AND t_xref.Name = "OwnedMembers"
q.

RoyEL1

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: A Java Interface Future<V>
« Reply #2 on: March 04, 2015, 01:24:22 am »
Thanks for the response. I was hoping for a gui based approach (I'm not sure I know everything about the tool itself) and not a programmatic (SQL Query) approach. In particular, in a UML sequence diagram, I would like to show a Future<String> and maybe a Future<int> type of objects.

qwerty

  • EA Guru
  • *****
  • Posts: 9434
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: A Java Interface Future<V>
« Reply #3 on: March 04, 2015, 02:25:35 am »
Getting the details is a bit more tricky since it is hidden in the format
Code: [Select]
@ELEMENT;GUID={31827957-4B04-48c0-8E78-EA5A11FDC474};Name=p1;Type=ClassifierTemplateParameter;Pos=0;@ENDELEMENT;The result itself is displayed in the search window and can be dbl-clicked to locate the single elements.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2498
  • Karma: +32/-2
    • View Profile
Re: A Java Interface Future<V>
« Reply #4 on: March 04, 2015, 09:32:34 am »
Quote
I was hoping for a gui based approach

Create an interface element, name it "Future", open the properties dialog, set Language to Java, go to the Templates tab, "Add" a Template Parameter, set its Name to "V".
The Sparx Team
support@sparxsystems.com

qwerty

  • EA Guru
  • *****
  • Posts: 9434
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: A Java Interface Future<V>
« Reply #5 on: March 04, 2015, 10:01:53 am »
If I understood correctly he wants to find them, not create.

q.