hudson.model.Hudson.getLabelAtom()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中hudson.model.Hudson.getLabelAtom()方法的一些代码示例,展示了Hudson.getLabelAtom()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getLabelAtom()方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getLabelAtom

Hudson.getLabelAtom介绍

[英]Returns the label atom of the given name.
[中]返回给定名称的标签原子。

代码示例

代码示例来源:origin: hudson/hudson-2.x

@Override
public LabelAtom getSelfLabel() {
  return getLabelAtom("master");
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

@Override
public LabelAtom getSelfLabel() {
  return getLabelAtom("master");
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

@Override
public LabelAtom getSelfLabel() {
  return getLabelAtom("master");
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

@Override
public LabelAtom getSelfLabel() {
  return getLabelAtom("master");
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Obtains an atom by its {@linkplain #getName() name}.
 */
public static LabelAtom get(String l) {
  return Hudson.getInstance().getLabelAtom(l);
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Obtains an atom by its {@linkplain #getName() name}.
 */
public static LabelAtom get(String l) {
  return Hudson.getInstance().getLabelAtom(l);
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Obtains an atom by its {@linkplain #getName() name}.
 */
public static LabelAtom get(String l) {
  return Hudson.getInstance().getLabelAtom(l);
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Obtains an atom by its {@linkplain #getName() name}.
 */
public static LabelAtom get(String l) {
  return Hudson.getInstance().getLabelAtom(l);
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Gets the label that exists on this system by the name.
 *
 * @return null if name is null.
 * @see Label#parseExpression(String) (String)
 */
public Label getLabel(String expr) {
  if (expr == null) {
    return null;
  }
  while (true) {
    Label l = labels.get(expr);
    if (l != null) {
      return l;
    }
    // non-existent
    try {
      labels.putIfAbsent(expr, Label.parseExpression(expr));
    } catch (RecognitionException e) {
      // laxly accept it as a single label atom for backward compatibility
      return getLabelAtom(expr);
    }
  }
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Gets the label that exists on this system by the name.
 *
 * @return null if name is null.
 * @see Label#parseExpression(String) (String)
 */
public Label getLabel(String expr) {
  if (expr == null) {
    return null;
  }
  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);
    }
  }
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Gets the label that exists on this system by the name.
 *
 * @return null if name is null.
 * @see Label#parseExpression(String) (String)
 */
public Label getLabel(String expr) {
  if (expr == null) {
    return null;
  }
  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);
    }
  }
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Gets the label that exists on this system by the name.
 *
 * @return null if name is null.
 * @see Label#parseExpression(String) (String)
 */
public Label getLabel(String expr) {
  if (expr == null) {
    return null;
  }
  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);
    }
  }
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Convers a whitespace-separate list of tokens into a set of {@link Label}s.
 *
 * @param labels
 *      Strings like "abc def ghi". Can be empty or null.
 * @return
 *      Can be empty but never null. A new writable set is always returned,
 *      so that the caller can add more to the set.
 * @since 1.308
 */
public static Set<LabelAtom> parse(String labels) {
  Set<LabelAtom> r = new TreeSet<LabelAtom>();
  labels = fixNull(labels);
  if(labels.length()>0)
    for( String l : new QuotedStringTokenizer(labels).toArray())
      r.add(Hudson.getInstance().getLabelAtom(l));
  return r;
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Convers a whitespace-separate list of tokens into a set of {@link Label}s.
 *
 * @param labels
 *      Strings like "abc def ghi". Can be empty or null.
 * @return
 *      Can be empty but never null. A new writable set is always returned,
 *      so that the caller can add more to the set.
 * @since 1.308
 */
public static Set<LabelAtom> parse(String labels) {
  Set<LabelAtom> r = new TreeSet<LabelAtom>();
  labels = fixNull(labels);
  if(labels.length()>0)
    for( String l : new QuotedStringTokenizer(labels).toArray())
      r.add(Hudson.getInstance().getLabelAtom(l));
  return r;
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Convers a whitespace-separate list of tokens into a set of {@link Label}s.
 *
 * @param labels
 *      Strings like "abc def ghi". Can be empty or null.
 * @return
 *      Can be empty but never null. A new writable set is always returned,
 *      so that the caller can add more to the set.
 * @since 1.308
 */
public static Set<LabelAtom> parse(String labels) {
  Set<LabelAtom> r = new TreeSet<LabelAtom>();
  labels = fixNull(labels);
  if(labels.length()>0)
    for( String l : new QuotedStringTokenizer(labels).toArray())
      r.add(Hudson.getInstance().getLabelAtom(l));
  return r;
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Convers a whitespace-separate list of tokens into a set of
 * {@link Label}s.
 *
 * @param labels Strings like "abc def ghi". Can be empty or null.
 * @return Can be empty but never null. A new writable set is always
 * returned, so that the caller can add more to the set.
 * @since 1.308
 */
public static Set<LabelAtom> parse(String labels) {
  Set<LabelAtom> r = new TreeSet<LabelAtom>();
  labels = fixNull(labels);
  if (labels.length() > 0) {
    for (String l : new QuotedStringTokenizer(labels).toArray()) {
      r.add(Hudson.getInstance().getLabelAtom(l));
    }
  }
  return r;
}

相关文章

Hudson类方法