Example usage for org.eclipse.jdt.core.compiler CharOperation fragmentEquals

List of usage examples for org.eclipse.jdt.core.compiler CharOperation fragmentEquals

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.compiler CharOperation fragmentEquals.

Prototype

public static final boolean fragmentEquals(char[] fragment, char[] name, int startIndex,
        boolean isCaseSensitive) 

Source Link

Document

If isCaseSensite is true, the equality is case sensitive, otherwise it is case insensitive.

Usage

From source file:com.ibm.research.tours.content.url.Signature.java

License:Open Source License

private static int checkName(char[] name, char[] typeName, int pos, int length) {
    if (CharOperation.fragmentEquals(name, typeName, pos, true)) {
        pos += name.length;//from   w  w  w.  j a  v  a  2 s  .co m
        if (pos == length)
            return pos;
        char currentChar = typeName[pos];
        switch (currentChar) {
        case ' ':
        case '.':
        case '<':
        case '>':
        case '[':
        case ',':
            return pos;
        default:
            if (ScannerHelper.isWhitespace(currentChar))
                return pos;

        }
    }
    return -1;
}