get the correct type of item detail, will give null if itemType/detail is empty
483802
private ItemDetail getItemDetail(Gson gson, JsonElement itemType, JsonElement detail) {
		if (itemType == null || detail == null) return null;

		Item.Type type = gson.fromJson(itemType, Item.Type.class);
		Class<? extends ItemDetail> detailType;

		switch (type) {
			case Armor:
				detailType = Armor.class;
				break;
			case Back:
				detailType = Back.class;
				break;
			case Bag:
				detailType = Bag.class;
				break;
			case Consumable:
				detailType = Consumable.class;
				break;
			case MiniPet:
				detailType = Mini.class;
				break;
			case Trinket:
				detailType = Trinket.class;
				break;
			case UpgradeComponent:
				detailType = UpgradeComponent.class;
				break;
			case Weapon:
				detailType = Weapon.class;
				break;
			default:
				detailType = Utility.class;
		}

		return gson.fromJson(detail, detailType);
	}
454829
@Override
    protected String getDetail(String data) {
        data = piece(data, U);
        return data.isEmpty() ? null
                : fromList(getBroker().callRPCList(detailRPC, null, patient.getIdElement().getIdPart(), data, data));
    }
1194564
private int getItemViewType(Class prototypeClass) {
    int itemViewType = -1;
    for (Renderer renderer : prototypes) {
      if (renderer.getClass().equals(prototypeClass)) {
        itemViewType = getPrototypeIndex(renderer);
        break;
      }
    }
    if (itemViewType == -1) {
      throw new PrototypeNotFoundException(
          "Review your RendererBuilder implementation, you are returning one"
              + " prototype class not found in prototypes collection");
    }
    return itemViewType;
  }
1295747
protected ItemData getCachedCleanItemData(NodeData parentData, QPathEntry name, ItemType itemType)
      throws RepositoryException
   {
      ItemData data = getCachedItemData(parentData, name, itemType);

      if (data != null && !data.isNode() && !(data instanceof NullItemData) && forceLoad((PropertyData)data))
      {
         cache.remove(data.getIdentifier(), data);
         data = null;
      }
      return data;
   }
929788
@Override
    public int getItemType(BaseCell item) {
        // if the item is a keyType, which means item.type is not the key
        int version = mViewManager != null ? mViewManager.getViewVersion(item.stringType) : 0;
        if (!TextUtils.isEmpty(item.typeKey)) {
            // we should use getTypeKey()
            String typeKey = item.typeKey + version;
            if (!mStrKeys.containsKey(typeKey)) {
                int newType = mTypeId.getAndIncrement();
                mStrKeys.put(typeKey, newType);
                mId2Types.put(newType, item.stringType);
            }

            return mStrKeys.get(typeKey).intValue();
        } else {
            // otherwise, use item.type as identity key
            // note, this now only be executed in MainThread, atomic not actually needed
            String stringType = item.stringType + version;
            if (!mStrKeys.containsKey(stringType)) {
                int newType = mTypeId.getAndIncrement();
                mStrKeys.put(stringType, newType);
                mId2Types.put(newType, item.stringType);
            }
            return mStrKeys.get(stringType).intValue();
        }
    }
923226
def get_detail_view(self, request, object, opts=None):
        
        view = self.get_view(request, self.view_class, opts)
        view.object = object
        return view
144413
function _convertDetails(type, details) {
  var convertedDetails = {}
  for (var data in details) {
    const string = type + '[' + data + ']';
    convertedDetails[string] = details[data];
  }
  return convertedDetails;
}
297589
function getMatrixItem (indent, info) {

  if (!info) {
    return null;
  }
  return [
    addPrefix(indent, info.name),
    info.hasProps ? 'Sub-Object' : info.type.name,
    info.valueTypeText,
    info.required ? '必須' : '',
    info.description[0] || ''
  ];
}
109047
function(){
      if (!this.options.details){ return; }

      if(this.options.detailsScope) {
        var $details = $(this.input).parents(this.options.detailsScope).find(this.options.details);
      } else {
        var $details = $(this.options.details);
      }

      var attribute = this.options.detailsAttribute,
        details = {};

      function setDetail(value){
        details[value] = $details.find("[" +  attribute + "=" + value + "]");
      }

      $.each(componentTypes, function(index, key){
        setDetail(key);
        setDetail(key + "_short");
      });

      $.each(placesDetails, function(index, key){
        setDetail(key);
      });

      this.$details = $details;
      this.details = details;
    }
621823
protected void showDetail(Listitem li) {
        @SuppressWarnings("unchecked")
        T value = li == null ? null : (T) li.getValue();
        String detail = value == null ? null : getDetail(value);
        detailView.setValue(detail);

        if (!getShowDetailPane() && detail != null) {
            ReportBox.modal(detail, detailTitle, getAllowPrint());
        }
    }
994976
function _parseSoapFaultDetail(detailNode){
        var errors = [];
        var i, childNodes = detailNode.childNodes, n = childNodes.length, childNode;
        for (i = 0; i < n; i++) {
          childNode = childNodes[i];
          if (childNode.nodeType !== 1) {
            continue;
          }
          switch (childNode.nodeName){
            case "Error":
              errors.push({
                ErrorCode: _getAttribute(childNode, "ErrorCode"),
                Description: _getAttribute(childNode, "Description"),
                Source: _getAttribute(childNode, "Source"),
                HelpFile: _getAttribute(childNode, "HelpFile")
              });
              break;
            default:
          }
        }
        return errors;
      }
910474
def get_by_details(self, name, type, clazz):
        """"""
        entry = DNSEntry(name, type, clazz)
        return self.get(entry)
1014393
private static String getFullNameForItem(@Nullable BlueOrganization org, @Nonnull Item item) {
        ItemGroup<?> group = getBaseGroup(org);
        return Functions.getRelativeNameFrom(item, group);
    }
1002445
public static String getDetailType(CmsObject cms, CmsResource detailPage, CmsResource parentFolder) {

        String type = null;
        try {
            if (OpenCms.getADEManager().isDetailPage(cms, detailPage)) {
                List<CmsDetailPageInfo> detailPages = OpenCms.getADEManager().getAllDetailPages(cms);
                if (parentFolder == null) {
                    parentFolder = cms.readParentFolder(detailPage.getStructureId());
                }
                for (CmsDetailPageInfo info : detailPages) {
                    if (info.getId().equals(detailPage.getStructureId())
                        || info.getId().equals(parentFolder.getStructureId())) {
                        type = info.getType();
                        if (type.startsWith(CmsDetailPageInfo.FUNCTION_PREFIX)) {
                            type = CmsXmlDynamicFunctionHandler.TYPE_FUNCTION;
                        }
                        break;
                    }
                }
            }
        } catch (CmsException e) {
            // parent folder can't be read, ignore
        }
        return type;
    }
1234553
function getLastVisibleItem() {
                        for (var i = lastIndexDisplayed; i >= firstIndexDisplayed; i--) {
                            if (that.items.itemAt(i)) {
                                return that.items.itemAt(i);
                            }
                        }
                        return null;
                    }
1051105
public Map<String, String> getDetails() {
        if (details == null) {
            return null;
        }
        return Collections.unmodifiableMap(details);
    }
1245776
def GET_parameteritemtypes(self) -> None:
        """"""
        for item in state.parameteritems:
            self._outputs[item.name] = self._get_itemtype(item)