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

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

Best Java code snippets using org.eclipse.jdt.core.compiler.CharOperation.indexOf (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.jdt.core.compiler/ecj

@Override
public ITypeAnnotationWalker toMethodReturn() {
  int close = CharOperation.indexOf(')', this.source);
  if (close != -1) {
    // optimization, see toMethodParameter.
    this.pos = close+1;
    return this;
  }
  return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER;
}
origin: org.eclipse.scout.sdk.deps/ecj

@Override
public ITypeAnnotationWalker toMethodReturn() {
  int close = CharOperation.indexOf(')', this.source);
  if (close != -1) {
    // optimization, see toMethodParameter.
    this.pos = close+1;
    return this;
  }
  return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private static int trapDoorRegexMatchRule(char[] name2, int matchRule) {
  return CharOperation.indexOf(regexPrefix, name2, false) == 0 ?
      SearchPattern.R_REGEXP_MATCH : matchRule;
}
@Override
origin: org.eclipse.tycho/org.eclipse.jdt.core

@Override
public ITypeAnnotationWalker toMethodReturn() {
  int close = CharOperation.indexOf(')', this.source);
  if (close != -1) {
    // optimization, see toMethodParameter.
    this.pos = close+1;
    return this;
  }
  return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public ITypeAnnotationWalker toMethodReturn() {
  int close = CharOperation.indexOf(')', this.source);
  if (close != -1) {
    // optimization, see toMethodParameter.
    this.pos = close+1;
    return this;
  }
  return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER;
}
origin: org.eclipse.jdt.core.compiler/ecj

public char[] nextWord() {
  this.end = CharOperation.indexOf(';', this.signature, this.start);
  if (this.bracket <= this.start) // already know it if its > start
    this.bracket = CharOperation.indexOf('<', this.signature, this.start);
  int dot = CharOperation.indexOf('.', this.signature, this.start);
  if (this.bracket > this.start && this.bracket < this.end)
    this.end = this.bracket;
  if (dot > this.start && dot < this.end)
    this.end = dot;
  return CharOperation.subarray(this.signature, this.start, this.start = this.end); // skip word
}
/**  similar to nextWord() but don't stop at '.' */
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public char[] nextWord() {
  this.end = CharOperation.indexOf(';', this.signature, this.start);
  if (this.bracket <= this.start) // already know it if its > start
    this.bracket = CharOperation.indexOf('<', this.signature, this.start);
  int dot = CharOperation.indexOf('.', this.signature, this.start);
  if (this.bracket > this.start && this.bracket < this.end)
    this.end = this.bracket;
  if (dot > this.start && dot < this.end)
    this.end = dot;
  return CharOperation.subarray(this.signature, this.start, this.start = this.end); // skip word
}
/**  similar to nextWord() but don't stop at '.' */
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public char[] nextWord() {
  this.end = CharOperation.indexOf(';', this.signature, this.start);
  if (this.bracket <= this.start) // already know it if its > start
    this.bracket = CharOperation.indexOf('<', this.signature, this.start);
  int dot = CharOperation.indexOf('.', this.signature, this.start);
  if (this.bracket > this.start && this.bracket < this.end)
    this.end = this.bracket;
  if (dot > this.start && dot < this.end)
    this.end = dot;
  return CharOperation.subarray(this.signature, this.start, this.start = this.end); // skip word
}
public String toString() {
origin: org.eclipse.jdt/org.eclipse.jdt.core

public char[] nextWord() {
  this.end = CharOperation.indexOf(';', this.signature, this.start);
  if (this.bracket <= this.start) // already know it if its > start
    this.bracket = CharOperation.indexOf('<', this.signature, this.start);
  int dot = CharOperation.indexOf('.', this.signature, this.start);
  if (this.bracket > this.start && this.bracket < this.end)
    this.end = this.bracket;
  if (dot > this.start && dot < this.end)
    this.end = dot;
  return CharOperation.subarray(this.signature, this.start, this.start = this.end); // skip word
}
/**  similar to nextWord() but don't stop at '.' */
origin: org.eclipse.tycho/org.eclipse.jdt.core

public char[] nextWord() {
  this.end = CharOperation.indexOf(';', this.signature, this.start);
  if (this.bracket <= this.start) // already know it if its > start
    this.bracket = CharOperation.indexOf('<', this.signature, this.start);
  int dot = CharOperation.indexOf('.', this.signature, this.start);
  if (this.bracket > this.start && this.bracket < this.end)
    this.end = this.bracket;
  if (dot > this.start && dot < this.end)
    this.end = dot;
  return CharOperation.subarray(this.signature, this.start, this.start = this.end); // skip word
}
/**  similar to nextWord() but don't stop at '.' */
origin: org.eclipse.jdt.core.compiler/ecj

/**  similar to nextWord() but don't stop at '.' */
public char[] nextName() {
  this.end = CharOperation.indexOf(';', this.signature, this.start);
  if (this.bracket <= this.start) // already know it if its > start
    this.bracket = CharOperation.indexOf('<', this.signature, this.start);
  if (this.bracket > this.start && this.bracket < this.end)
    this.end = this.bracket;
  return CharOperation.subarray(this.signature, this.start, this.start = this.end); // skip name
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

/**  similar to nextWord() but don't stop at '.' */
public char[] nextName() {
  this.end = CharOperation.indexOf(';', this.signature, this.start);
  if (this.bracket <= this.start) // already know it if its > start
    this.bracket = CharOperation.indexOf('<', this.signature, this.start);
  if (this.bracket > this.start && this.bracket < this.end)
    this.end = this.bracket;
  return CharOperation.subarray(this.signature, this.start, this.start = this.end); // skip name
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

public String getModuleDoc() throws JavaModelException {
  if (this.content == null) return null;
  int index = CharOperation.indexOf(JavadocConstants.MODULE_DESCRIPTION_START, this.content, false, 0);
  if (index == -1) return null;
  int end = CharOperation.indexOf(JavadocConstants.BOTTOM_NAVBAR, this.content, false, index);
  if (end == -1) end = this.content.length -1;
  return String.valueOf(CharOperation.subarray(this.content, index, end));
}

origin: org.eclipse.tycho/org.eclipse.jdt.core

public String getModuleDoc() throws JavaModelException {
  if (this.content == null) return null;
  int index = CharOperation.indexOf(JavadocConstants.MODULE_DESCRIPTION_START, this.content, false, 0);
  if (index == -1) return null;
  int end = CharOperation.indexOf(JavadocConstants.BOTTOM_NAVBAR, this.content, false, index);
  if (end == -1) end = this.content.length -1;
  return String.valueOf(CharOperation.subarray(this.content, index, end));
}

origin: org.eclipse.jdt.core.compiler/ecj

  @Override
  public int getParameterCount() {
    int count = 0;
    int start = CharOperation.indexOf('(', this.source) + 1;
    while (start < this.source.length && this.source[start] != ')') {
      start = typeEnd(start) + 1;
      count++;
    }
    return count;
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private char[] erasure(char[] typeName) {
  int genericStart = CharOperation.indexOf(Signature.C_GENERIC_START, typeName);
  if (genericStart > -1)
    typeName = CharOperation.subarray(typeName, 0, genericStart);
  return typeName;
}
public void addConstructorDeclaration(
origin: org.eclipse.jdt/org.eclipse.jdt.core

  @Override
  public int getParameterCount() {
    int count = 0;
    int start = CharOperation.indexOf('(', this.source) + 1;
    while (start < this.source.length && this.source[start] != ')') {
      start = typeEnd(start) + 1;
      count++;
    }
    return count;
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private static char[] trapDoorRegexExtractModuleName(char[] name2) {
  int index = CharOperation.indexOf(regexPrefix, name2, false);
  return index >= 0 ? CharOperation.subarray(name2, index + regexPrefix.length, name2.length) : name2;
}
/*
origin: org.eclipse.tycho/org.eclipse.jdt.core

  @Override
  public int getParameterCount() {
    int count = 0;
    int start = CharOperation.indexOf('(', this.source) + 1;
    while (start < this.source.length && this.source[start] != ')') {
      start = typeEnd(start) + 1;
      count++;
    }
    return count;
  }
}
origin: org.eclipse.jdt.core.compiler/ecj

void updateSourceName(int newId) {
  int hashPos = CharOperation.indexOf('#', this.sourceName);
  this.varId = newId;
  this.sourceName = CharOperation.concat(
      CharOperation.subarray(this.sourceName, 0, hashPos),
      Integer.toString(this.varId).toCharArray(),
      '#');
}

org.eclipse.jdt.core.compilerCharOperationindexOf

Javadoc

Answers the first index in the array for which the corresponding character is equal to toBeFound. Answers -1 if no occurrence of this character is found.

For example:
  1.  
    toBeFound = 'c' 
    array = { ' a', 'b', 'c', 'd' } 
    result => 2 
    
  2.  
    toBeFound = 'e' 
    array = { ' a', 'b', 'c', 'd' } 
    result => -1 
    

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
  • 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
  • concat
    Answers the concatenation of the three arrays. It answers null if the three arrays are null. If firs
  • compareTo,
  • concat,
  • fragmentEquals,
  • isWhitespace,
  • match,
  • replaceOnCopy,
  • hashCode,
  • prefixEquals,
  • deepCopy

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • orElseThrow (Optional)
  • getSharedPreferences (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JList (javax.swing)
  • JOptionPane (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