Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Getting stereotype's property values.
Getting stereotype's property values. [message #625991] Thu, 07 February 2008 13:36
Eclipse UserFriend
Originally posted by: antti.evesti.vtt.fi

Hi

I have connected a stereotype for a component element. Now I try to get
properties and their values from that stereotype, how I should do this?
Following code gives properties' names correctly, but I cannot find a way to
getting values for these properties. I suppose this is quite trivial task.
However, I cannot find a suitable method for this task.

Thanks,
Antti

<------------------ CODE ----------------------------------->
private void getStereotypes(Component component) {

System.out.println("** Getting stereotypes for " +
component.getLabel());


EList<Stereotype> e = component.getAppliedStereotypes();

for(Stereotype s : e) {

System.out.println(s.getLabel());

EList<Property> el = s.getAttributes();

for(Property p : el) {

System.out.println(p.getLabel());

}

}



}

}
Previous Topic:Implementation of constriants in UML models
Next Topic:Implementation of constriants in UML models
Goto Forum:
  


Current Time: Thu Mar 28 08:18:46 GMT 2024

Powered by FUDForum. Page generated in 0.02370 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top