Book a Demo

Author Topic: How to Show Java's List in a Class Diagram  (Read 3223 times)

petritis

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • knowledge quester
    • View Profile
How to Show Java's List in a Class Diagram
« on: May 15, 2006, 06:48:45 am »
I am trying to figure out how to show a java List in a class diagram (java.util.List).
I have imported my classes and can show them fine, but how to get I get List?
Do I have to import something from java to get it?
Does it already know about it and I just need to do the right thing to make it show it to me?
Or something else...

Thank You,
John Petritis

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: How to Show Java's List in a Class Diagram
« Reply #1 on: May 15, 2006, 07:07:22 am »
Yes, you will have to do an import.

You can import the entire Java model, and break it into packages to make it easier to use. Search this forum for information on how.

David
No, you can't have it!

petritis

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • knowledge quester
    • View Profile
Re: How to Show Java's List in a Class Diagram
« Reply #2 on: May 15, 2006, 08:27:16 am »
I got it working, and here is some info about it to help others trying to do the same thing.

It took some digging, but I found I could Import from Binary and tell it to read from a jar.
So importing from javas rt.jar would give me what I needed, but it is way to big.
So I manually extracted java.util classes from the rt.jar file.
Then I reverse engineer imported them (on the reverse engineer dialog I had to tell it to use .class files instead of the default .java)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: How to Show Java's List in a Class Diagram
« Reply #3 on: May 15, 2006, 08:41:34 am »
Excellent John!

And, your method and description seem more concise than what we've had before. Thanks much!
No, you can't have it!