public Component createComponent() { return new ComponentImpl(); }
@Override public Object clone() throws CloneNotSupportedException { RuntimeComponentImpl clone = (RuntimeComponentImpl)super.clone(); clone.policyProviders = new ArrayList<PolicyProvider>(); return clone; } }
@Override public Object clone() throws CloneNotSupportedException { ComponentImpl clone = (ComponentImpl)super.clone(); clone.properties = new ArrayList<ComponentProperty>(); for (ComponentProperty property : getProperties()) { clone.properties.add((ComponentProperty)property.clone()); } clone.references = new ArrayList<ComponentReference>(); for (ComponentReference reference : getReferences()) { clone.references.add((ComponentReference)reference.clone()); } clone.services = new ArrayList<ComponentService>(); for (ComponentService service : getServices()) { clone.services.add((ComponentService)service.clone()); } // Clone the implementation.composite if(implementation instanceof Composite) { clone.implementation = (Composite) ((Composite) implementation).clone(); } // Clone the Lists for intents and policySets clone.requiredIntents = new ArrayList<Intent>(getRequiredIntents()); clone.policySets = new ArrayList<PolicySet>(getPolicySets()); return clone; }
public ComponentService getService(String name) { for (ComponentService service : getServices()) { if (service.getName().equals(name)) { return service; } } return null; }
public ComponentReference getReference(String name){ for (ComponentReference ref : getReferences()){ if (ref.getName().equals(name)){ return ref; } } return null; }
public ComponentProperty getProperty(String name) { for (ComponentProperty property : getProperties()) { if (property.getName().equals(name)) { return property; } } return null; }
@Override public Object clone() throws CloneNotSupportedException { ComponentImpl clone = (ComponentImpl)super.clone(); clone.properties = new ArrayList<ComponentProperty>(); for (ComponentProperty property : getProperties()) { clone.properties.add((ComponentProperty)property.clone()); } clone.references = new ArrayList<ComponentReference>(); for (ComponentReference reference : getReferences()) { clone.references.add((ComponentReference)reference.clone()); } clone.services = new ArrayList<ComponentService>(); for (ComponentService service : getServices()) { clone.services.add((ComponentService)service.clone()); } // Clone the implementation.composite if(implementation instanceof Composite) { clone.implementation = (Composite) ((Composite) implementation).clone(); } // Clone the Lists for intents and policySets clone.requiredIntents = new ArrayList<Intent>(getRequiredIntents()); clone.policySets = new ArrayList<PolicySet>(getPolicySets()); return clone; }
public ComponentService getService(String name) { for (ComponentService service : getServices()) { if (service.getName().equals(name)) { return service; } } return null; }
public ComponentReference getReference(String name){ for (ComponentReference ref : getReferences()){ if (ref.getName().equals(name)){ return ref; } } return null; }
public ComponentProperty getProperty(String name) { for (ComponentProperty property : getProperties()) { if (property.getName().equals(name)) { return property; } } return null; }
public Component createComponent() { return new ComponentImpl(); }