This implementation scans the enclosed elements.

@param e  {@inheritDoc}
@param p  {@inheritDoc}
@return the result of scanning
198702
@Override
    public R visitVariable(VariableElement e, P p) {
        return scan(e.getEnclosedElements(), p);
    }
143927
public IToken evaluate(ICharacterScanner scanner)
	{
		offset = 0;
		int c = read(scanner);
		if (c != ICharacterScanner.EOF && fDetector.isWordStart((char) c))
		{
			if (fColumn == UNDEFINED || fColumn == scanner.getColumn() - 1)
			{
				fBuffer.setLength(0);
				fBuffer.append((char) c);

				for (int i = 0; i < getMaxPartCount(); i++)
				{
					// read a word for each part
					do
					{
						c = read(scanner);
						fBuffer.append((char) c);
						// System.out.println("Read: '"+c + "' - '"+(char)c+"'");
					} while (c != ICharacterScanner.EOF && c != ' '
							&& fDetector.isWordStart((char) c));
				}

				// we may have read EOF so unread it
				popEof(scanner);

				final char lastChar = fBuffer.charAt(fBuffer.length()-1);
				if (lastChar==' ' || lastChar=='\t'
						|| lastChar=='\n' || lastChar=='\r')
				{
					unread(scanner);// last space
					fBuffer.delete(fBuffer.length() - 1, fBuffer.length());
				}
				
				String text = fBuffer.toString().toString().replace('\n', ' ').replace('\r', ' ').replace('\t', ' ');
				String key = text;// text.substring(0, text.length() - 1);


				WordMatch match = checkMatch(key);
				if (match != null)
				{
					if (match.unMatchedLength > 0)
					{
						// unread unmatched parts
						for (int i = 0; i < match.unMatchedLength; i++)
						{
							unread(scanner);
						}
					}

					return match.token;
				}

				if (fDefaultToken.isUndefined())
				{
					unreadBuffer(scanner);
				}

				return returnEmpty(fDefaultToken);

			}
		}

		unread(scanner);
		return returnEmpty(Token.UNDEFINED);
	}
698317
@Override
    public R visitIndex(IndexTree node, P p) {
        R r = scan(node.getSearchTerm(), p);
        r = scanAndReduce(node.getDescription(), p, r);
        return r;
    }
192330
function(p) {

			var _this = this;
			var w = window;
			var data = p.data;

			// Is data a form object
			if (_this.domInstance('form', data)) {
				data = _this.nodeListToJSON(data.elements);
			}
			else if ('NodeList' in w && data instanceof NodeList) {
				data = _this.nodeListToJSON(data);
			}
			else if (_this.domInstance('input', data)) {
				data = _this.nodeListToJSON([data]);
			}

			// Is data a blob, File, FileList?
			if (('File' in w && data instanceof w.File) ||
				('Blob' in w && data instanceof w.Blob) ||
				('FileList' in w && data instanceof w.FileList)) {
				data = {file: data};
			}

			// Loop through data if it's not form data it must now be a JSON object
			if (!('FormData' in w && data instanceof w.FormData)) {

				for (var x in data) if (data.hasOwnProperty(x)) {

					if ('FileList' in w && data[x] instanceof w.FileList) {
						if (data[x].length === 1) {
							data[x] = data[x][0];
						}
					}
					else if (_this.domInstance('input', data[x]) && data[x].type === 'file') {
						continue;
					}
					else if (_this.domInstance('input', data[x]) ||
						_this.domInstance('select', data[x]) ||
						_this.domInstance('textArea', data[x])) {
						data[x] = data[x].value;
					}
					else if (_this.domInstance(null, data[x])) {
						data[x] = data[x].innerHTML || data[x].innerText;
					}
				}
			}

			p.data = data;
			return data;
		}
1074309
function (checks) {
    this.from = this.char;

    // Move to the next non-space character.
    var start;
    if (/\s/.test(this.peek())) {
      start = this.char;

      while (/\s/.test(this.peek())) {
        this.from += 1;
        this.skip();
      }
    }

    // Methods that work with multi-line structures and move the
    // character pointer.

    var match = this.scanComments() ||
      this.scanStringLiteral(checks) ||
      this.scanTemplateLiteral();

    if (match) {
      return match;
    }

    // Methods that don't move the character pointer.

    match =
      this.scanRegExp() ||
      this.scanPunctuator() ||
      this.scanKeyword() ||
      this.scanIdentifier() ||
      this.scanNumericLiteral();

    if (match) {
      this.skip(match.value.length);
      return match;
    }

    // No token could be matched, give up.

    return null;
  }
1072024
public LinkedList<UriTemplateComponent> scan(String templateString) throws MalformedUriTemplateException
    {
        char[] template = templateString.toCharArray();
        startTemplate();
        int i;
        for (i = 0; i < template.length; i++)
        {
            char c = template[i];

            if (c == EXPR_START)
            {
                if (literalCaptureOn)
                {
                    endLiteral(i);
                }
                startExpression(i);
            }

            if (c != EXPR_START)
            {
                startLiteral(i);
            }


            if (expressionCaptureOn || literalCaptureOn)
            {
                capture(c);
            }

            if (c == EXPR_END)
            {
                endExpression(i);
                startLiteral(i);
            }
        }
        if (literalCaptureOn)
        {
            endLiteral(i);
        }
        endTemplate(i);
        return components;
    }
517073
@Override
    public T element() {
        T retrievedElement = peek();

        if (retrievedElement == null) {
            throw new NoSuchElementException();
        }

        return retrievedElement;
    }
284837
private boolean handleWrapping(MouseEvent e)
    {
        if (robot == null)
        {
            return false;
        }
        PointerInfo pointerInfo = null;
        try
        {
            pointerInfo = MouseInfo.getPointerInfo();
        }
        catch (SecurityException ex)
        {
            return false;
        }
        Rectangle r = 
            pointerInfo.getDevice().getDefaultConfiguration().getBounds();
        Point onScreen = pointerInfo.getLocation();
        if (onScreen.y == 0)
        {
            robot.mouseMove(onScreen.x, r.height-2);
            previousPoint = new Point(onScreen.x, r.height-2);
            SwingUtilities.convertPointFromScreen(previousPoint, spinner);
            return true;
        } 
        else if (onScreen.y == r.height - 1)
        {
            robot.mouseMove(onScreen.x, 1);
            previousPoint = new Point(onScreen.x, 1);
            SwingUtilities.convertPointFromScreen(previousPoint, spinner);
            return true;
        }
        return false;
    }
399025
@Override
    public R visitLink(LinkTree node, P p) {
        R r = scan(node.getReference(), p);
        r = scanAndReduce(node.getLabel(), p, r);
        return r;
    }
408317
public static void p(int i, Regex r) {
        if (0 == i) {
            System.out.println(i + ": " + r.stringMatched());
        } else {
            System.out.println(i + ": " + r.stringMatched(i));
        }
    }
1321578
@SuppressWarnings("unchecked")
    @Override
    public E poll() {
        if (_size.get() == 0)
            return null;

        E e = null;

        _headLock.lock(); // Size cannot shrink
        try {
            if (_size.get() > 0) {
                final int head = _indexes[HEAD_OFFSET];
                e = (E) _elements[head];
                _elements[head] = null;
                _indexes[HEAD_OFFSET] = (head + 1) % _elements.length;
                if (_size.decrementAndGet() > 0)
                    _notEmpty.signal();
            }
        } finally {
            _headLock.unlock();
        }
        return e;
    }
1010245
public static <P extends ParaObject> List<P> readPageFromTable(String appid, Pager p) {
		Pager pager = (p != null) ? p : new Pager();
		ScanRequest scanRequest = new ScanRequest().
				withTableName(getTableNameForAppid(appid)).
				withLimit(pager.getLimit()).
				withReturnConsumedCapacity(ReturnConsumedCapacity.TOTAL);

		if (!StringUtils.isBlank(pager.getLastKey())) {
			scanRequest = scanRequest.withExclusiveStartKey(Collections.
					singletonMap(Config._KEY, new AttributeValue(pager.getLastKey())));
		}

		ScanResult result = getClient().scan(scanRequest);
		LinkedList<P> results = new LinkedList<>();
		for (Map<String, AttributeValue> item : result.getItems()) {
			P obj = fromRow(item);
			if (obj != null) {
				results.add(obj);
			}
		}

		if (result.getLastEvaluatedKey() != null) {
			pager.setLastKey(result.getLastEvaluatedKey().get(Config._KEY).getS());
		} else if (!results.isEmpty()) {
			// set last key to be equal to the last result - end reached.
			pager.setLastKey(results.peekLast().getId());
		}
		return results;
	}
55852
@Override
    public R visitDocComment(DocCommentTree node, P p) {
        R r = scan(node.getFirstSentence(), p);
        r = scanAndReduce(node.getBody(), p, r);
        r = scanAndReduce(node.getBlockTags(), p, r);
        return r;
    }
801717
@Override
    public R visitPackage(PackageElement e, P p) {
        assert e.getKind() == PACKAGE: "Bad kind on PackageElement";
        return defaultAction(e, p);
    }
822239
@Override
    public R visitStartElement(StartElementTree node, P p) {
        return scan(node.getAttributes(), p);
    }
766613
public int getScannerStart( int p )
  {
    Element elem = getDefaultRootElement();
    int lineNum = elem.getElementIndex( p );
    Element line = elem.getElement( lineNum );
    AttributeSet a = line.getAttributes();
    while( a.isDefined( CommentAttribute ) && lineNum > 0 )
    {
      lineNum -= 1;
      line = elem.getElement( lineNum );
      a = line.getAttributes();
    }
    return line.getStartOffset();
  }
854137
@Override
    public R visitArrayAccess(ArrayAccessTree node, P p) {
        R r = scan(node.getExpression(), p);
        r = scanAndReduce(node.getIndex(), p, r);
        return r;
    }