Gets the tag class with the given id.

@param id Id of the tag.
@return The tag class with the given id, or null if it cannot be found.
198570
public static Class<? extends Tag> getClassFor(int id) {
        if(!idToTag.containsKey(id)) {
            return null;
        }

        return idToTag.get(id);
    }
387626
public E getById(String id) {
        if (id == null) {
            for (E element : this) {
                if (element != null && element.getId() == null) {
                    return element;
                }
            }
        } else {
            for (E element : this) {
                if (element != null && id.equals(element.getId())) {
                    return element;
                }
            }
        }
        return null;
    }
561934
private String getValueForId(String id) {
        for (int k = 0; k < fieldset.getWidgetCount(); k++) {
            Widget widget = fieldset.getWidget(k);
            if (id.equals(widget.getElement().getAttribute("id")))
                return widget.getElement().getAttribute("value");
        }
        return null;
    }
1088146
function (id) {
            var id = id + "";
            if (id && id.indexOf("+") != -1) {
                if (Aria.testMode) {
                    return this.$getAutoId(id);
                }
                return null;
            }
            return this.$getId(id);
        }
171967
public static final <T extends Model> T find(Class<T> cls, Long id) {
		return Select.from(cls).where(_ID + "=?", id).fetchSingle();
	}
330644
LoadClass getClassByID(long classObjectID) {
        long[] offset = new long[] { startOffset };

        while (offset[0] < endOffset) {
            long start = offset[0];
            long classID = readLoadClassID(offset);

            if (classID == classObjectID) {
                return new LoadClass(this, start);
            }
        }

        return null;
    }
883758
public C get(String id){
		C container = this.containerMap.get(id);

		if(container != null && (container.getState()).equals(State.REMOVED)){
			return null;
		}

		return container;
	}
818053
public static function get($id){
		$class_name = get_called_class();
		if( !isset(self::$instances[$class_name]) ){
			self::$instances[$class_name] = [];
		}
		if( !isset(self::$instances[$class_name][$id]) ){
			self::$instances[$class_name][$id] = new $class_name($id);
		}
		return self::$instances[$class_name][$id];
	}
835349
public function getContextObjectWithIDAndClass($id, $className) {
		$result = null;
		if ($id && $className) {
			$prevMode = Versioned::get_reading_mode();
			Versioned::set_reading_mode("Stage.Stage");

			$result = DataObject::get_by_id($className, $id);

			Versioned::set_reading_mode($prevMode);
		}
		return $result;
	}
952383
public static Id normalize(Id id) {
    return (new DefaultId(id.name())).withTags(id.tags()).normalize();
  }
769565
private <T> Class<? extends T> getObjectFromClassMap(String id, Map<String, Object> classMap)
    {
        Object obj = classMap.get(id);
        
        if(obj == null)
        {
            return null;    //object for this id wasn't found on the map
        }
        
        if(obj instanceof Class<?>)
        {
            return (Class<? extends T>)obj;
        }
        else if (obj instanceof String )
        {
            Class<?> clazz = ClassUtils.simpleClassForName((String)obj);
            classMap.put(id, clazz);
            return (Class<? extends T>)clazz;
        }
        
        //object stored in the map for this id is an invalid type.  remove it and return null
        classMap.remove(id);
        return null;        
    }
142515
public RegisteredServiceDocument get(final long id) {
        try {
            return this.get(String.valueOf(id));
        } catch (final DocumentNotFoundException e) {
            LOGGER.debug("Service [{}] not found. [{}]", id, e.getMessage());
            return null;
        }
    }
1288829
public <V extends View> V get(int id) {
        Object result = mViews.get(id);

        if (result == NULL) {
            return null;
        }

        if (result != null) {
            return cast(result);
        }

        result = mView.findViewById(id);

        if (result == null) {
            mViews.put(id, NULL);
        } else {
            mViews.put(id, result);
        }

        return cast(result);
    }
676578
@Nullable
    public Container getContainerWithId(@Nonnull String id) {
        if (id == null || id.trim().length() == 0) {
            throw new IllegalArgumentException("A container ID must be provided.");
        }

        for (Container container : getContainers()) {
            if (container.getId().equals(id)) {
                return container;
            }
        }

        return null;
    }
333635
protected final <T> T getId(String name, Class<T> clazz) {
    Object[] entityIds = getAll(name + ".id");
    if (Arrays.isEmpty(entityIds)) entityIds = getAll(name + "Id");
    if (Arrays.isEmpty(entityIds)) entityIds = getAll("id");
    if (Arrays.isEmpty(entityIds)) return null;
    else {
      String entityId = entityIds[0].toString();
      int commaIndex = entityId.indexOf(',');
      if (commaIndex != -1) entityId = entityId.substring(0, commaIndex);
      return Params.converter.convert(entityId, clazz);
    }
  }
988514
public Content getAllClassesLinkScript(String id) {
        HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
        script.addAttr(HtmlAttr.TYPE, "text/javascript");
        String scriptCode = "<!--" + DocletConstants.NL +
                "  allClassesLink = document.getElementById(\"" + id + "\");" + DocletConstants.NL +
                "  if(window==top) {" + DocletConstants.NL +
                "    allClassesLink.style.display = \"block\";" + DocletConstants.NL +
                "  }" + DocletConstants.NL +
                "  else {" + DocletConstants.NL +
                "    allClassesLink.style.display = \"none\";" + DocletConstants.NL +
                "  }" + DocletConstants.NL +
                "  //-->" + DocletConstants.NL;
        Content scriptContent = new RawHtml(scriptCode);
        script.addContent(scriptContent);
        Content div = HtmlTree.DIV(script);
        return div;
    }
9999
protected Person getPersonById(String id) {
		Person person = null;
		try {
			Long personId = Long.valueOf(id);
			if (logger.isDebugEnabled()) {
				logger.debug("Retrieving Person with id=[{}]", personId);
			}
			person = entityManager.find(Person.class, personId);
		} catch (NumberFormatException e) {
			if (logger.isWarnEnabled()) {
				logger.warn("Invalid number format: {}", id);
			}
		}
		if (person == null) {
			throw new IllegalArgumentException();
		}
		return person;
	}