Codota Logo
CharOperation.fragmentEquals
Code IndexAdd Codota to your IDE (free)

How to use
fragmentEquals
method
in
org.eclipse.jdt.core.compiler.CharOperation

Best Java code snippets using org.eclipse.jdt.core.compiler.CharOperation.fragmentEquals (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e.nls

protected boolean isIgnored(final char[] content, final int offset) {
 int nlPos = CharOperation.indexOf('\n', content, offset);
 if (nlPos < m_ignorePattern.length) {
  return false;
 }
 if (content[nlPos - 1] == '\r') {
  nlPos--;
 }
 return CharOperation.fragmentEquals(m_ignorePattern, content, nlPos - m_ignorePattern.length, false);
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private static int checkName(char[] name, char[] typeName, int pos, int length) {
  if (CharOperation.fragmentEquals(name, typeName, pos, true)) {
    pos += name.length;
    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;
}
private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
origin: org.eclipse.tycho/org.eclipse.jdt.core

private static int checkName(char[] name, char[] typeName, int pos, int length) {
  if (CharOperation.fragmentEquals(name, typeName, pos, true)) {
    pos += name.length;
    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;
}
private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
origin: trylimits/Eclipse-Postfix-Code-Completion

private static int checkName(char[] name, char[] typeName, int pos, int length) {
  if (CharOperation.fragmentEquals(name, typeName, pos, true)) {
    pos += name.length;
    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;
}
private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private static int checkName(char[] name, char[] typeName, int pos, int length) {
  if (CharOperation.fragmentEquals(name, typeName, pos, true)) {
    pos += name.length;
    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;
}
private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

private static int checkName(char[] name, char[] typeName, int pos, int length) {
  if (CharOperation.fragmentEquals(name, typeName, pos, true)) {
    pos += name.length;
    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;
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private static int checkName(char[] name, char[] typeName, int pos, int length) {
  if (CharOperation.fragmentEquals(name, typeName, pos, true)) {
    pos += name.length;
    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;
}
private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
origin: org.eclipse.scout.sdk/org.eclipse.scout.sdk.core

private static int checkName(char[] name, char[] typeName, int pos, int length) {
 if (CharOperation.fragmentEquals(name, typeName, pos, true)) {
  pos += name.length;
  if (pos == length) {
   return pos;
  }
  char currentChar = typeName[pos];
  switch (currentChar) {
   case C_SPACE:
   case C_DOT:
   case C_GENERIC_START:
   case C_GENERIC_END:
   case C_ARRAY:
   case C_COMMA:
    return pos;
   default:
    if (ScannerHelper.isWhitespace(currentChar)) {
     return pos;
    }
  }
 }
 return -1;
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 *  Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {
  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

/**
 *  Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {
  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 *  Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {
  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: org.eclipse.jdt.core.compiler/ecj

/**
 *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {

  if (!isPrototype()) {
    ReferenceBinding memberType = this.prototype.getMemberType(typeName);
    return memberType == null ? null : this.environment.createMemberType(memberType, this);
  }

  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {

  if (!isPrototype()) {
    ReferenceBinding memberType = this.prototype.getMemberType(typeName);
    return memberType == null ? null : this.environment.createMemberType(memberType, this);
  }

  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {

  if (!isPrototype()) {
    ReferenceBinding memberType = this.prototype.getMemberType(typeName);
    return memberType == null ? null : this.environment.createMemberType(memberType, this);
  }

  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {

  if (!isPrototype()) {
    ReferenceBinding memberType = this.prototype.getMemberType(typeName);
    return memberType == null ? null : this.environment.createMemberType(memberType, this);
  }

  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {

  if (!isPrototype()) {
    ReferenceBinding memberType = this.prototype.getMemberType(typeName);
    return memberType == null ? null : this.environment.createMemberType(memberType, this);
  }

  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 */
@Override
public ReferenceBinding getMemberType(char[] typeName) {

  if (!isPrototype()) {
    ReferenceBinding memberType = this.prototype.getMemberType(typeName);
    return memberType == null ? null : this.environment.createMemberType(memberType, this);
  }

  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: org.eclipse.scout.sdk.deps/ecj

/**
 *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {

  if (!isPrototype()) {
    ReferenceBinding memberType = this.prototype.getMemberType(typeName);
    return memberType == null ? null : this.environment.createMemberType(memberType, this);
  }

  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: com.vaadin/vaadin-client-compiler-deps

/**
 *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 */
public ReferenceBinding getMemberType(char[] typeName) {

  if (!isPrototype()) {
    ReferenceBinding memberType = this.prototype.getMemberType(typeName);
    return memberType == null ? null : this.environment.createMemberType(memberType, this);
  }

  for (int i = this.memberTypes.length; --i >= 0;) {
    ReferenceBinding memberType = this.memberTypes[i];
    if (memberType instanceof UnresolvedReferenceBinding) {
      char[] name = memberType.sourceName; // source name is qualified with enclosing type name
      int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
      if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
        if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
          return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */);
    } else if (CharOperation.equals(typeName, memberType.sourceName)) {
      return memberType;
    }
  }
  return null;
}
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
origin: trylimits/Eclipse-Postfix-Code-Completion

  turnOff = true;
} else if (this.tagsKind == this.currentToken
  && CharOperation.fragmentEquals(this.disablingTag, this.scanner.source, tokenStartPosition, true)) {
  this.editsEnabled = false;
  turnOff = true;
  setEditsEnabled(foundTaskCount);
} else if (this.tagsKind == this.currentToken) {
  this.editsEnabled = CharOperation.fragmentEquals(this.enablingTag, this.scanner.source, tokenStartPosition, true);
  turnOff = true;
} else if (this.tagsKind == this.currentToken
  && CharOperation.fragmentEquals(this.disablingTag, this.scanner.source, tokenStartPosition, true)) {
  this.editsEnabled = false;
  turnOff = true;
  setEditsEnabled(foundTaskCount);
} else if (this.tagsKind == this.currentToken) {
  this.editsEnabled = CharOperation.fragmentEquals(this.enablingTag, this.scanner.source, tokenStartPosition, true);
org.eclipse.jdt.core.compilerCharOperationfragmentEquals

Javadoc

If isCaseSensite is true, the equality is case sensitive, otherwise it is case insensitive. Answers true if the name contains the fragment at the starting index startIndex, otherwise false.

For example:
  1.  
    fragment = { 'b', 'c' , 'd' } 
    name = { 'a', 'b', 'c' , 'd' } 
    startIndex = 1 
    isCaseSensitive = true 
    result => true 
    
  2.  
    fragment = { 'b', 'c' , 'd' } 
    name = { 'a', 'b', 'C' , 'd' } 
    startIndex = 1 
    isCaseSensitive = true 
    result => false 
    
  3.  
    fragment = { 'b', 'c' , 'd' } 
    name = { 'a', 'b', 'C' , 'd' } 
    startIndex = 0 
    isCaseSensitive = false 
    result => false 
    
  4.  
    fragment = { 'b', 'c' , 'd' } 
    name = { 'a', 'b'} 
    startIndex = 0 
    isCaseSensitive = true 
    result => false 
    

Popular methods of CharOperation

  • equals
    If isCaseSensite is true, answers true if the two arrays are identical character by character, other
  • lastIndexOf
    Answers the last index in the array for which the corresponding character is equal to toBeFound star
  • splitOn
    Return a new array which is the split of the given array using the given divider. The given end is e
  • subarray
    Answers a new array which is a copy of the given array starting at the given start and ending at the
  • toString
    Answers a string which is the concatenation of the given array using the '.' as a separator. For ex
  • arrayConcat
    Answers the concatenation of the two arrays. It answers null if the two arrays are null. If the firs
  • camelCaseMatch
    Answers true if the pattern matches the given name using CamelCase rules, or false otherwise. char[]
  • concatWith
    Answers the concatenation of the given array parts using the given separator between each part and a
  • pathMatch
    Answers true if the pattern matches the filepath using the pathSepatator, false otherwise. Path char
  • indexOf
    Answers the first index in the array for which the toBeFound array is a matching subarray following
  • replace
    Answers a new array of characters with substitutions. No side-effect is operated on the original arr
  • compareTo
    Compares the two char arrays lexicographically between the given start and end positions. Returns a
  • replace,
  • compareTo,
  • concat,
  • isWhitespace,
  • match,
  • replaceOnCopy,
  • hashCode,
  • prefixEquals,
  • deepCopy

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now