Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » how to access the subclass from the superclass(how to access the subclass from the superclass in EMF metamodel, using a java code)
how to access the subclass from the superclass [message #1060560] Sun, 26 May 2013 17:42
Fatima Salhi is currently offline Fatima Salhi
Messages: 2
Registered: May 2013
Junior Member

hi everyone
Here are some of my EMF meta model:

index.php/fa/15051/0/

I want to retrieve the names of all primitives
here is my java code:

Systeme s = (Systeme)resource.getContents().get(0);

//Component
EList<Component> list1 = s.getComponente();
Iterator i1 = list1.iterator();
while (i1.hasNext()){
Component c =(Component) i1.next();
java.lang.System.out.println(c.getNom());
}
but this code displays the names of all the Component elements
how can I access the Primitive class from the Component class?

Previous Topic:hi there
Next Topic:Eclipse crashes with exit code 1
Goto Forum:
  


Current Time: Tue May 28 04:10:58 EDT 2013

Powered by FUDForum. Page generated in 0.01789 seconds