org.eclipse.pde.ds.core_1.0.100.v20100601

erence;

public class DSReference
  extends DSObject
  implements IDSReference
{
  private static final long serialVersionUID = 1L;
  
  public DSReference(DSModel model)
  {
    super(model, "reference");
    
    setReferenceCardinality("1..1");
    setReferencePolicy("static");
    
    int ref_count = model.getDSComponent().getReferences().length + 1;
    
    setReferenceName("reference" + 
      ref_count);
    setReferenceInterface("interface" + 
      ref_count);
  }
  
  public boolean canAddChild(int objectType)
  {
    return false;
  }
  
  public boolean canBeParent()
  {
    return false;
  }
  
  public String getName()
  {
    return getReferenceName();
  }
  
  public int getType()
  {
    return 6;
  }
  
  public void setReferenceName(String name)
  {
    setXMLAttribute("name", name);
  }
  
  public String getReferenceName()
  {
    return getXMLAttributeValue("name");
  }
  
  public void setReferenceInterface(String interfaceName)
  {
    setXMLAttribute("interface", interfaceName);
  }
  
  public String getReferenceInterface()
  {
    return getXMLAttributeValue("interface");
  }
  
  public void setReferenceCardinality(String cardinality)
  {
    setXMLAttribute("cardinality", cardinality);
  }
  
  public String getReferenceCardinality()
  {
    return getXMLAttributeValue("cardinality");
  }
  
  public void setReferencePolicy(String policy)
  {
    setXMLAttribute("policy", policy);
  }
  
  public String getReferencePolicy()
  {
    return getXMLAttributeValue("policy");
  }
  
  public void setReferenceTarget(String target)
  {
    setXMLAttribute("target", target);
  }
  
  public String getReferenceTarget()
  {
    return getXMLAttributeValue("target");
  }
  
  public void setReferenceBind(String bind)
  {
    setXMLAttribute("bind", bind);
  }
  
  public String getReferenceBind()
  {
    return getXMLAttributeValue("bind");
  }
  
  public void setReferenceUnbind(String unbind)
  {
    setXMLAttribute("unbind", unbind);
  }
  
  public String getReferenceUnbind()
  {
    return getXMLAttributeValue("unbind");
  }
  
  public String[] getAttributesNames()
  {
    return new String[] { "bind", 
      "cardinality", 
      "interface", 
      "name", 
      "policy", 
      "target", 
      "unbind" };
  }
  
  public boolean isLeafNode()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.ds.core.text.DSReference
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.ds.core.text;

import java.util.ArrayList;
import org.eclipse.pde.internal.ds.core.IDSProvide;
import org.eclipse.pde.internal.ds.core.IDSService;

public class DSService
  extends DSObject
  implements IDSService
{
  private static final long serialVersionUID = 1L;
  
  public DSService(DSModel model)
  {
    super(model, "service");
  }
  
  public boolean canAddChild(int objectType)
  {
    return objectType == 5;
  }
  
  public boolean canBeParent()
  {
    return true;
  }
  
  public String getName()
  {
    return "service";
  }
  
  public int getType()
  {
    return 4;
  }
  
  public void setServiceFactory(boolean bool)
  {
    setBooleanAttributeValue("servicefactory", bool);
  }
  
  public boolean getServiceFactory()
  {
    return getBooleanAttributeValue("servicefactory", false);
  }
  
  public IDSProvide[] getProvidedServices()
  {
    ArrayList childNodesList = getChildNodesList(IDSProvide.class, true);
    IDSProvide[] providedServices = new IDSProvide[childNodesList.size()];
    for (int i = 0; i < childNodesList.size(); i++) {
      providedServices[i] = ((IDSProvide)childNodesList.get(i));
    }
    return providedServices;
  }
  
  public void addProvidedService(IDSProvide provide)
  {
    addChildNode(provide, true);
  }
  
  public void removeProvidedService(IDSProvide provide)
  {
    removeChildNode(provide, true);
  }
  
  public String[] getAttributesNames()
  {
    return new String[] { "servicefactory" };
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.ds.core.text.DSService
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
1 2 3

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd