documentation inherited from interface Path
349064
public void init (Pathable pable, long tickstamp)
    {
        _sx = pable.getX();
        _sy = pable.getY();
        // change the duration to a real stop time
        if (_duration == -1L) {
            _stopTime = Long.MAX_VALUE;
        } else {
            _stopTime = tickstamp + _duration;
        }
        _nextMove = tickstamp;
    }
846317
@SuppressWarnings({"unchecked", "PMD.AvoidInstantiatingObjectsInLoops"})
    private void bindValuePaths() {
        for (ConfigPath item : tree.getPaths()) {
            toValue(
                    bind(Key.get(item.getDeclaredTypeWithGenerics(), new ConfigImpl(item.getPath()))),
                    item.getValue());
        }
    }
1121829
private void recurse(Bundle bundle, String path, IResourceVisitor visitor, String relPathName) throws IOException {
		Enumeration<?> entries = bundle.findEntries(path, "*", false); //$NON-NLS-1$
		if (entries != null) {
			while (entries.hasMoreElements()) {
				URL child = (URL)entries.nextElement();
				String childPath = child.getPath();
				String temp = childPath;
				if (temp.endsWith("/")) { //$NON-NLS-1$
					temp = temp.substring(0, temp.length()-1);
				}
				int idx = temp.lastIndexOf("/"); //$NON-NLS-1$
				String childName = temp.substring(idx+1);
				String relPath = relPathName
						+ (relPathName.length() == 0 ? "" : "/") //$NON-NLS-1$ //$NON-NLS-2$
						+ childName;
				boolean result = visitor.visitResource(
						new VisitorResource(child, relPath), relPath);
				if (result && child.getPath().endsWith("/")) { //$NON-NLS-1$
					recurse(bundle, childPath, visitor, relPath);
				}
			}
		}
	}
1063062
@Override
  public PathImpl schemeWalk(String userPath,
                         Map<String,Object> newAttributes,
                         String uri,
                         int offset)
  {
    int length = uri.length();

    if (length < 2 + offset
        || uri.charAt(offset) != '/'
        || uri.charAt(1 + offset) != '/')
      throw new RuntimeException("bad scheme");

    CharBuffer buf = new CharBuffer();
    int i = 2 + offset;
    int ch = 0;
    boolean isIpv6 = false;
    
    for (; 
          (i < length
           && (ch = uri.charAt(i)) != '/'
           && ch != '?'
           && ! (ch == ':' && ! isIpv6));
         i++) {
      if (ch == '[')
        isIpv6 = true;
      else if (ch == ']')
        isIpv6 = false;
      
      buf.append((char) ch);
    }

    String host = buf.toString();
    if (host.length() == 0)
      throw new RuntimeException("bad host");

    int port = 0;
    if (ch == ':') {
      for (i++; i < length && (ch = uri.charAt(i)) >= '0' && ch <= '9'; i++) {
        port = 10 * port + uri.charAt(i) - '0';
      }
    }

    return create(this, userPath, newAttributes, host, port);
  }
149735
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        String strValue = null;
        String strDesc = null;
        String strImage = null;
        String strCommand = null;
        String strToolTip = null;
        Record record = null;
        BaseField field = null;
        if (properties != null)
        {
            strValue = (String)properties.get(ScreenModel.VALUE);
            strDesc = (String)properties.get(ScreenModel.DESC);
            strImage = (String)properties.get(ScreenModel.IMAGE);
            strCommand = (String)properties.get(ScreenModel.COMMAND);
            strToolTip = (String)properties.get(ScreenModel.TOOLTIP);
            record = (Record)properties.get(ScreenModel.RECORD);
            field = (BaseField)properties.get(ScreenModel.FIELD);          
        }
        
        this.init((ScreenLocation)itsLocation, (BasePanel)parentScreen, (Converter)fieldConverter, iDisplayFieldDesc, strValue, strDesc, strImage, strCommand, strToolTip, record, field);
    }
1205361
private Path getCollectionPath() {
        Path collectionPath = PathUtils.ReportsDirectory.getPathForObject(getInstance());
        return collectionPath.resolve(provider.getArtifactPath(getInstance()));
    }
229269
public void eInit(XtendTypeDeclaration container, String name, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlBehaviorUnit == null) {
			this.container = container;
			this.sarlBehaviorUnit = SarlFactory.eINSTANCE.createSarlBehaviorUnit();
			this.sarlBehaviorUnit.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendMember());
			this.sarlBehaviorUnit.setName(newTypeRef(container, name));
			container.getMembers().add(this.sarlBehaviorUnit);
		}
	}
632154
@Override
  public PathImpl schemeWalk(String userPath,
                         Map<String,Object> attributes,
                         String filePath,
                         int offset)
  {
    int length = filePath.length();

    if (length <= offset || filePath.charAt(offset) != '(')
      return super.schemeWalk(userPath, attributes, filePath, offset);

    MergePath mergePath = createMergePath();
    mergePath.setUserPath(userPath);

    int head = ++offset;
    int tail = head;
    while (tail < length) {
      int ch = filePath.charAt(tail);

      if (ch == ')') {
        if (head + 1 != tail) {
          String subPath = filePath.substring(head, tail);

          if (subPath.startsWith("(") && subPath.endsWith(")"))
            subPath = subPath.substring(1, subPath.length() - 1);

          mergePath.addMergePath(VfsOld.lookup(subPath));
        }

        if (tail + 1 == length)
          return mergePath;
        else
          return mergePath.fsWalk(userPath, attributes, filePath.substring(tail + 1));
      }
      else if (ch == ';') {
        String subPath = filePath.substring(head, tail);

        if (subPath.startsWith("(") && subPath.endsWith(")"))
          subPath = subPath.substring(1, subPath.length() - 1);

        mergePath.addMergePath(VfsOld.lookup(subPath));

        head = ++tail;
      }
      else if (ch == '(') {
        int depth = 1;

        for (tail++; tail < length; tail++) {
          if (filePath.charAt(tail) == '(')
            depth++;
          else if (filePath.charAt(tail) == ')') {
            tail++;
            depth--;
            if (depth == 0)
              break;
          }
        }

        if (depth != 0)
          return new NotFoundPath(getSchemeMap(), filePath);
      }
      else
        tail++;
    }

    return new NotFoundPath(getSchemeMap(), filePath);
  }
1107690
boolean isIntermediaryPath(final JsonPointer jp) {
        List<String> jpRefTokens = jp.tokens();
        int jpSize = jpRefTokens.size();
        if (jpSize == 1) {
            return false;
        }

        Node node = root;
        for (int i = 1; i < jpSize; i++) {
            Node childMatch = node.match(jpRefTokens.get(i));
            if (childMatch == null) {
                return false;
            } else {
                node = childMatch;
            }
        }

        return node.children != null;
    }
516947
protected DocPath pathString(TypeElement te, DocPath name) {
        return pathString(utils.containingPackage(te), name);
    }
176723
@Override
	public ResourceBundlePathsIterator getBundlePaths(DebugMode debugMode, String bundleId,
			ConditionalCommentCallbackHandler commentCallbackHandler, Map<String, String> variants) {

		List<JoinableResourceBundle> currentBundles = new ArrayList<>();

		// if the path did not correspond to a global bundle, find the requested
		// one.
		if (!isGlobalResourceBundle(bundleId)) {
			for (JoinableResourceBundle bundle : contextBundles) {
				if (bundle.getId().equals(bundleId)) {

					currentBundles.add(bundle);
					break;
				}
			}
		}

		return getBundleIterator(debugMode, currentBundles, commentCallbackHandler, variants);
	}
826106
@Override
	public String getFilePath(String resourcePath) {

		String filePath = null;
		List<ResourceBrowser> list = new ArrayList<>();
		list.addAll(resourceInfoProviders);
		for (Iterator<ResourceBrowser> iterator = list.iterator(); iterator.hasNext() && filePath == null;) {
			ResourceBrowser rsBrowser = iterator.next();
			if (generatorRegistry.isPathGenerated(resourcePath)) {
				if (rsBrowser instanceof ResourceGenerator) {
					ResourceGenerator rsGeneratorBrowser = (ResourceGenerator) rsBrowser;
					if (rsGeneratorBrowser.getResolver().matchPath(resourcePath)) {
						filePath = rsBrowser.getFilePath(resourcePath);
					}
				}
			} else {
				if (!(rsBrowser instanceof ResourceGenerator)) {
					filePath = rsBrowser.getFilePath(resourcePath);
				}
			}
		}
		return filePath;
	}
912828
private static void getPath(BaseComponent comp, StringBuilder sb) {
        while (comp instanceof BaseMenuComponent) {
            sb.insert(0, "\\" + ((BaseMenuComponent) comp).getLabel());
            comp = comp.getParent();
        }
    }
792413
static Class getMostDerivedInterface(Class controlIntf)
    {
        while (controlIntf.isAnnotationPresent(ControlExtension.class))
        {
            Class [] intfs = controlIntf.getInterfaces();
            boolean found = false;
            for (int i = 0; i < intfs.length; i++)
            {
                if (intfs[i].isAnnotationPresent(ControlExtension.class) ||
                    intfs[i].isAnnotationPresent(ControlInterface.class))
                {
                    controlIntf = intfs[i];
                    found = true;
                    break;
                }
            }
            if (!found)
            {
                throw new ControlException("Can't find base control interface for " + controlIntf);
            }
        }
        return controlIntf;
    }
1171854
@Override
  protected void buildClassPath(ArrayList<String> pathList)
  {
    String path = null;
    
    if (_path instanceof JarPath)
      path = ((JarPath) _path).getContainer().getNativePath();
    else if (_path.isDirectory())
      path = _path.getNativePath();

    if (path != null && ! pathList.contains(path))
      pathList.add(path);
  }
86815
private static String getClasspathResourceAsString(String resourcePath) {
        try (InputStream is = DefaultHelperClassSourceProvider.class.getClassLoader().getResourceAsStream(resourcePath);
             java.util.Scanner s = new java.util.Scanner(is)) {
            return s.useDelimiter("\\A").hasNext() ? s.next() : "";
        } catch (IOException e) {
            throw new RuntimeException(e);
            //should never happen and if it does then all RuntimeExceptions should be caught in LambdaFactory
        }
    }
473024
public final void interfaceDeclaration() throws RecognitionException {
		int interfaceDeclaration_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 16) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:338:5: ( normalInterfaceDeclaration | annotationTypeDeclaration )
			int alt27=2;
			int LA27_0 = input.LA(1);
			if ( (LA27_0==93) ) {
				alt27=1;
			}
			else if ( (LA27_0==58) ) {
				alt27=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 27, 0, input);
				throw nvae;
			}

			switch (alt27) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:338:7: normalInterfaceDeclaration
					{
					pushFollow(FOLLOW_normalInterfaceDeclaration_in_interfaceDeclaration543);
					normalInterfaceDeclaration();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:339:11: annotationTypeDeclaration
					{
					pushFollow(FOLLOW_annotationTypeDeclaration_in_interfaceDeclaration555);
					annotationTypeDeclaration();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 16, interfaceDeclaration_StartIndex); }

		}
	}