Returns the locator for the given Lob, or zero if null.

@throws ClassCastException if Lob is unrecognized
975464
public long getLocator(Lob lob) {
        if (lob == null) {
            return 0;
        }
        Long locator = (Long) lob.getLocator();
        return locator == null ? 0 : locator;
    }
356507
protected function locateObject()
	{
		if ( $this->locatorUsed ) {
			return;
		}

		// NodeElement + TargetElement = Proxy.
		$this->locatorUsed = true;

		$object = call_user_func(
			array($this->className, 'fromNodeElements'),
			$this->locateElements(),
			null,
			$this->pageFactory
		);

		\ArrayObject::offsetSet(null, $object);
	}
975002
private static ClassDescriptor findInheritanceRoot(ClassDescriptor cld)
    {
        ClassDescriptor result = cld;
        if(cld.getSuperClassDescriptor() != null)
        {
            result = findInheritanceRoot(cld.getSuperClassDescriptor());
        }
        return result;
    }
1094835
public String getLocationAsString() {

        if (null != locator) {
            StringBuilder sbuffer  = new StringBuilder();
            String       systemID = locator.getSystemId();
            int          line     = locator.getLineNumber();
            int          column   = locator.getColumnNumber();

            if (null != systemID) {
                sbuffer.append("; SystemID: ");
                sbuffer.append(systemID);
            }

            if (0 != line) {
                sbuffer.append("; Line#: ");
                sbuffer.append(line);
            }

            if (0 != column) {
                sbuffer.append("; Column#: ");
                sbuffer.append(column);
            }

            return sbuffer.toString();
        } else {
            return null;
        }
    }
680021
@Programmatic
    @Override
    public Location getLocation() {
        final String latLng = getLatLng();
        return latLng != null? Location.fromString(latLng.replace(",",";")): null;
    }
754083
@Override
    public OptionalEntity<USER_ENTITY> findLoginUser(Object userId) {
        assertUserIdRequired(userId);
        try {
            @SuppressWarnings("unchecked")
            final ID castId = (ID) userId;
            return doFindLoginUser(castId);
        } catch (ClassCastException e) { // also find method, because of generic cast
            throw new IllegalStateException("Cannot cast the user ID: " + userId.getClass() + ", " + userId, e);
        }
    }
226667
@Nullable
    private Comparable<?> getCallingObject() {
        String sig = getSigConstantOperand();
        if (Values.SIG_VOID.equals(SignatureUtils.getReturnSignature(sig))) {
            return null;
        }

        int numParameters = SignatureUtils.getNumParameters(sig);

        if (stack.getStackDepth() <= numParameters) {
            return null;
        }

        OpcodeStack.Item caller = stack.getStackItem(numParameters);
        UserObject uo = (UserObject) caller.getUserValue();
        if ((uo != null) && (uo.caller != null)) {
            return uo.caller;
        }

        int reg = caller.getRegisterNumber();
        if (reg >= 0) {
            return Integer.valueOf(reg);
        }

        /*
         * We ignore the possibility of two fields with the same name in different
         * classes
         */
        XField f = caller.getXField();
        if (f != null) {
            return f.getName();
        }
        return null;
    }
494243
public Object create(Object locator) throws CreateException {
		if (locator == null)
			throw new NullPointerException("Locator cannot be null");

		// Iterate from the latest factories
		for (int index = _factories.size() - 1; index >= 0; index--) {
			IFactory factory = _factories.get(index);
			if (factory.canCreate(locator) != null)
				return factory.create(locator);
		}

		throw new CreateException(null, locator);
	}
610818
public MessageBean setLocation(final Locator locator) {
        if (locator == null) {
            return this;
        }
        final MessageBean ret = new MessageBean(this);
        if (locator.getSystemId() != null) {
            try {
                ret.srcFile = new URI(locator.getSystemId());
            } catch (final URISyntaxException e) {
                throw new RuntimeException("Failed to parse URI '" + locator.getSystemId() + "': " + e.getMessage(), e);
            }
        }
        ret.srcLine = locator.getLineNumber();
        ret.srcColumn = locator.getColumnNumber();
        return ret;
    }
1140222
public void setDocumentLocator (@Nullable final Locator aLocator)
  {
    if (m_bTrackPosition)
    {
      m_aLocator = aLocator;
      _updatePosition ("setLocator");
      if (aLocator instanceof Locator2)
      {
        m_sSourceXMLVersion = ((Locator2) aLocator).getXMLVersion ();
        m_sSourceXMLEncoding = ((Locator2) aLocator).getEncoding ();
      }
    }
  }
527535
public static URL getLocation(Class self) {
        CodeSource codeSource = self.getProtectionDomain().getCodeSource();

        return null == codeSource ? null : codeSource.getLocation();
    }
660559
@Override
	public int getLocationX() throws WidgetException {
		try {
			Point p = findElement().getLocation();
			return p.getX();
		} catch (Exception e) {
			throw new WidgetException("Error while fetching X location", locator, e);
		}
	}
811893
public String getLocation(Class<?> clazz) {

        String filename = clazz.getName().replace('.', '/');
        int pos = filename.lastIndexOf('/') + 1;
        return (pos > 0 ? filename.substring(0, pos) : "");
    }
1002698
protected ObjectCacheDescriptor searchInClassDescriptor(Class targetClass)
    {
        return targetClass != null ? broker.getClassDescriptor(targetClass).getObjectCacheDescriptor() : null;
    }
840238
private Map<JDBCStorableProperty<S>, Integer> findLobs() {
        Map<JDBCStorableProperty<S>, Integer> lobIndexMap =
            new IdentityHashMap<JDBCStorableProperty<S>, Integer>();

        int lobIndex = 0;

        for (JDBCStorableProperty<S> property : mAllProperties.values()) {
            if (isLobType(property)) {
                lobIndexMap.put(property, lobIndex++);
            }
        }

        return lobIndexMap;
    }
966790
public static ClassLocation getClassLocation(final Node aNode, final Set<ClassLocation> classLocations) {


        if (aNode != null) {

            // The LocalName of the supplied DOM Node should be either "complexType" or "simpleType".
            final String nodeLocalName = aNode.getLocalName();
            final boolean acceptableType = "complexType".equalsIgnoreCase(nodeLocalName)
                    || "simpleType".equalsIgnoreCase(nodeLocalName);

            if (acceptableType) {

                final String nodeClassName = DomHelper.getNameAttribute(aNode);
                for (ClassLocation current : classLocations) {

                    // TODO: Ensure that the namespace of the supplied aNode matches the expected namespace.

                    // Issue #25: Handle XML Type renaming.
                    final String effectiveClassName = current.getAnnotationRenamedTo() == null
                            ? current.getClassName()
                            : current.getAnnotationRenamedTo();
                    if (effectiveClassName.equalsIgnoreCase(nodeClassName)) {
                        return current;
                    }
                }
            }
        }

        // Nothing found
        return null;
    }
122388
private static String validLocation(final String loc) throws IOException {
        if (!RsReturn.LOC_PTRN.matcher(loc).matches()) {
            throw new IOException(
                String.format(
                    "Location \"%s\" should complain RFC 3987",
                    loc
                )
            );
        }
        return loc;
    }