Retrieve an action by its name.
@param entity cannot be <code>null</code>.
@param name cannot be <code>null</code> or empty.
@return the located action or <code>null</code> if not found.
964592
public static Action getActionByName(Entity entity, String name) {
        if(entity == null) {
            throw new IllegalArgumentException("entity cannot be null.");
        }
        if(StringUtils.isBlank(name)) {
            throw new IllegalArgumentException("name cannot be null or empty.");
        }
        List<Action> actions = entity.getActions();
        if (actions == null)
            return null;
        Action action = null;
        for (Action a : actions) {
            if (a.getName().equals(name)) {
                action = a;
                break;
            }
        }
        return action;
    }
324801
public V get(String name) {
        V rc = null;
        K key = getKey(name);
        if (null != key) {
            rc = get(key);
        }
        return rc;
    }
1165816
public static String getNamespace(HasMetadata entity) {
    if (entity != null) {
      return getNamespace(entity.getMetadata());
    } else {
      return null;
    }
  }
1040704
public ManagedEntity findChild(ManagedEntity parent, String name) throws RuntimeFault, RemoteException {
        if (parent == null) {
            throw new IllegalArgumentException("parent entity must not be null.");
        }
        ManagedObjectReference mor = getVimService().findChild(getMOR(), parent.getMOR(), name);
        return MorUtil.createExactManagedEntity(getServerConnection(), mor);
    }
547707
public MethodDeclaration getMethod(String name, String signature) {
    for (EntityDeclaration node : type.getMembers()) {
      if (node.getEntityType() == EntityType.METHOD) {
        MethodDeclaration method = (MethodDeclaration) node;
        if (method.getName().equals(name) && signature.equals(signature(method))) {
          return method;
        }
      }
    }
    return null;
  }
457617
def _get_entity_by_name(self, entity_name):
        """"""
        if entity_name in self._registry:
            return self._registry[entity_name]
        else:
            return self._find_entity_in_records_by_class_name(entity_name)
866543
public static String getName(HasMetadata entity) {
    if (entity != null) {
      return getName(entity.getMetadata());
    } else {
      return null;
    }
  }
160874
public static String getParameter(ServletRequest request, String name) {
    String s = request.getParameter(name);
    if (s == null) {
      return null;
    }
    s = s.trim();
    return s.length() == 0? null: s;
  }
265202
public Api getActionResult(String action, String params) throws Exception {
    Api result = this.getActionResult(action, params, null, null);
    return result;
  }
1239494
public String getCollectionName(Object entity) {
        if (entity == null) {
            return null;
        }

        return getCollectionName(entity.getClass());
    }
51600
private static Name checkNotReserved(Name name, String action) {
    if (isReserved(name)) {
      throw new IllegalArgumentException("cannot " + action + ": " + name);
    }
    return name;
  }
981685
@Override
    public String lookupEntityName(JsonEntityBean entity) {
        if (entity == null) {
            throw new IllegalArgumentException("Parameter cannot be null.");
        }
        EntityEnum entityEnum = entity.getEntityType();
        if (entityEnum == null) {
            throw new IllegalArgumentException(
                    String.format(
                            "Parameter's entityType has an unknown value of [%s]",
                            entity.getEntityType()));
        }
        IEntityNameFinder finder;
        if (entityEnum.isGroup()) {
            finder = EntityNameFinderService.instance().getNameFinder(IEntityGroup.class);
        } else {
            finder = EntityNameFinderService.instance().getNameFinder(entityEnum.getClazz());
        }

        try {
            return finder.getName(entity.getId());
        } catch (Exception e) {
            /* An exception here isn't the end of the world.  Just log it
            and return null. */
            log.warn("Couldn't find name for entity " + entity.getId(), e);
            return null;
        }
    }
918471
public static Logger getLogger(String name){
		if (name == null) {
			throw new IllegalArgumentException(
			        "The Logger name must not be null.");
		}

		return loggerRepository.getLogger(name);
	}
1346815
@SuppressWarnings("unchecked")
    private <A> A getRequestAttribute(String name) {

        Object attribute = m_request.getAttribute(name);

        return attribute != null ? (A)attribute : null;
    }
1055584
public Boolean get(String name) throws IOException {
        return Boolean.valueOf(isSet(getPosition(name)));
    }
886126
protected Object session(String name){
        Object val = session().get(name);
        return val == null ? null : val;
    }
37513
public final synchronized L[] get(String name) {
        return (this.map != null)
                ? this.map.get(name)
                : null;
    }