/*
(non-Javadoc)

@see qc.automation.framework.widget.element.InteractiveElement#getLabel()
558395
@Override
    public String getLabel() throws WidgetException {
        try {
            return getText();
        } catch (Exception e) {
            throw new WidgetException("Error while getting button text", getByLocator(), e);
        }
    }
73811
public JsonElement get(String label) {
        int i = 0;
        try{
            for (JsonElement e : this) {
                if(e.isPrimitive() && e.asPrimitive().asString().equals(label)) {
                    return e;
                } else if((e.isObject() || e.isArray())  && Integer.valueOf(label).equals(i)) {
                    return e;
                }
                i++;
            }
        } catch(NumberFormatException e) {
            // fail gracefully
            return null;
        }
        // the element was not found
        return null;
    }
979272
public synchronized CheckBox setLabel(String label) {
        if(label == null) {
            throw new IllegalArgumentException("Cannot set CheckBox label to null");
        }
        this.label = label;
        invalidate();
        return this;
    }
990057
public Label getLabelByName(String name) {
        for (Label label : labels) {
            if (name.equals(label.getName())) {
                return label;
            }
        }
        return null;
    }
26552
public String getLabel() {
		if (log.isLoggable(Level.FINER)) {
			final String methodName = "getLabel"; //$NON-NLS-1$
			log.entering(DependencyList.class.getName(), methodName);
			log.exiting(DependencyList.class.getName(), methodName, label);
		}
		return label;
	}
908783
public function getLabel()
	{
		// Checks if the object has a label
		$label = $this->label;

		// if not guess one from the name
		if (is_null($label))
		{
			$label = $this->getName();
		}

		return $label;
	}
1231910
public com.google.api.ads.adwords.axis.v201809.cm.Label getLabel() {
        return label;
    }
262690
private JPanel getJPanel() {
		if (jPanel == null) {
			javax.swing.JLabel jLabel = new JLabel(Constant.messages.getString("edit.find.label.what"));

			jPanel = new JPanel();
            GroupLayout layout = new GroupLayout(jPanel);
            jPanel.setLayout(layout);
            layout.setAutoCreateGaps(true);
            layout.setAutoCreateContainerGaps(true);
            layout.setHonorsVisibility(infoLabel, Boolean.FALSE);

            layout.setHorizontalGroup(
                    layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(jLabel))
                            .addGroup(
                                    layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(getTxtFind())
                                            .addComponent(infoLabel)
                                            .addComponent(getJPanel1())));

            layout.setVerticalGroup(
                    layout.createSequentialGroup()
                            .addGroup(
                                    layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel)
                                            .addComponent(getTxtFind()))
                            .addComponent(infoLabel)
                            .addComponent(getJPanel1()));
		}
		return jPanel;
	}
356341
public String getSelectedLabel() {
        List<WebElement> options = getElement().findElements(By.tagName("option"));
        for (WebElement option : options) {
            if (option.isSelected()) {
                return option.getText();
            }
        }
        return null;
    }
1321477
private static String getLabel(String name, Priority priority) {
        return priority == null ? null : Labels.getLabel("vistanotification.priority." + name + "." + priority.name());
    }
110268
public static String getLabelFor(InputComponent<?, ?> input, boolean addColon)
   {
      String label = input.getLabel();
      // If no label was provided, use name
      if (label == null)
      {
         label = input.getName();
      }
      // if a colon is required, add it
      if (addColon && !label.endsWith(COLON))
      {
         label += COLON;
      }
      return label;
   }
288767
@Nullable
  static Name inlineLabel(@Nullable CharSequence label, Inliner inliner) {
    return (label == null)
        ? null
        : inliner.asName(inliner.getOptionalBinding(new Key(label)).or(label));
  }
1094311
def get_label(self, name):
        """"""
        label_tag = self._find_label(name)
        return _Label(label_tag.get('id'), label_tag.get('color'), label_tag.text)
1264223
@Nullable
    protected View getCommentLabel() {
        final String commentPrompt = dialogConfiguration.commentPrompt();
        if (commentPrompt != null) {
            final TextView labelView = new TextView(this);
            labelView.setText(commentPrompt);
            return labelView;
        }
        return null;
    }
1361228
private static Field getLabelStatusField() {
        if (labelStatusField == null) {
            labelStatusField = getLabelField("a");
            if (labelStatusField == null) {
                labelStatusField = getLabelField("status");
            }
        }
        return labelStatusField;
    }
77255
static Object getLabel(FacesContext context, 
                                        UIComponent component) {
                                        
        Object o = component.getAttributes().get("label");
        if (o == null || (o instanceof String && ((String) o).length() == 0)) {
            o = component.getValueExpression("label");
        }
        // Use the "clientId" if there was no label specified.
        if (o == null) {
            o = component.getClientId(context);
        }
        return o;
    }
639185
public Label getLabel(String expr) {
        if(expr==null)  return null;
        expr = hudson.util.QuotedStringTokenizer.unquote(expr);
        while(true) {
            Label l = labels.get(expr);
            if(l!=null)
                return l;

            // non-existent
            try {
                labels.putIfAbsent(expr,Label.parseExpression(expr));
            } catch (ANTLRException e) {
                // laxly accept it as a single label atom for backward compatibility
                return getLabelAtom(expr);
            }
        }
    }