Ejemplo n.º 1
0
  /**
   * Get all parameters.
   *
   * @return All parameters.
   */
  public IParameter[] getParameters() {
    IParameter[] ret;

    Collection params =
        getState()
            .getAttributeValues(getRPlan(), OAVBDIRuntimeModel.parameterelement_has_parameters);
    if (params != null) {
      ret = new IParameter[params.size()];
      int i = 0;
      for (Iterator it = params.iterator(); it.hasNext(); i++) {
        Object param = it.next();
        String name =
            (String) getState().getAttributeValue(param, OAVBDIMetaModel.modelelement_has_name);
        ret[i] =
            ParameterFlyweight.getParameterFlyweight(
                getState(), getScope(), param, name, getRPlan());
      }
    } else {
      ret = new IParameter[0];
    }
    return ret;
  }
Ejemplo n.º 2
0
 /**
  * Get a parameter.
  *
  * @param name The name.
  * @return The parameter.
  */
 public IParameter getParameter(String name) {
   return ParameterFlyweight.getParameterFlyweight(state, rcapa, null, name, rplan);
 }