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

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

Best Java code snippets using org.eclipse.jdt.core.compiler.CharOperation.lastIndexOf (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: INRIA/spoon

int lastSlash = CharOperation.lastIndexOf(File.separatorChar, charName);
if (lastSlash != -1) {
  char[] modulePath = CharOperation.subarray(charName, 0, lastSlash);
  lastSlash = CharOperation.lastIndexOf(File.separatorChar, modulePath);
  if (lastSlash == -1) {
    lastSlash = 0;
origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Converts a java binary name to a simple name.
 */
public static char[] binaryNameToSimpleName(char[] binaryName) {
  int skipIndex = Math.max(
      Math.max(CharOperation.lastIndexOf('$', binaryName), CharOperation.lastIndexOf('.', binaryName)),
      CharOperation.lastIndexOf('/', binaryName)) + 1;
  return CharArrayUtils.subarray(binaryName, skipIndex);
}
origin: org.eclipse.scout.sdk/org.eclipse.scout.sdk.core

@Override
public String getElementName() {
 if (m_fileName == null) {
  char[] array = m_astNode.getFileName();
  int i = Math.max(CharOperation.lastIndexOf('/', array), CharOperation.lastIndexOf('\\', array));
  m_fileName = i >= 0 ? new String(array, i + 1, array.length - i - 1) : new String(array);
 }
 return m_fileName;
}
origin: org.eclipse.scout.sdk.deps/ecj

private char[] getReturnType(char[] methodSignature) {
  // skip type parameters
  int paren = CharOperation.lastIndexOf(')', methodSignature);
  // there could be thrown exceptions behind, thus scan one type exactly
  return CharOperation.subarray(methodSignature, paren + 1,
      methodSignature.length);
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private char[] getReturnType(char[] methodSignature) {
  // skip type parameters
  int paren = CharOperation.lastIndexOf(')', methodSignature);
  // there could be thrown exceptions behind, thus scan one type exactly
  return CharOperation.subarray(methodSignature, paren + 1,
      methodSignature.length);
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

public char[][] getPackageName() {
  char[] typeName = this.initialTypeName.toCharArray();
  int lastIndex = CharOperation.lastIndexOf('/', typeName);
  return CharOperation.splitOn('/', typeName, 0, lastIndex);
}
public int hashCode() {
origin: org.eclipse.jdt.core.compiler/ecj

private char[] getReturnType(char[] methodSignature) {
  // skip type parameters
  int paren = CharOperation.lastIndexOf(')', methodSignature);
  // there could be thrown exceptions behind, thus scan one type exactly
  return CharOperation.subarray(methodSignature, paren + 1,
      methodSignature.length);
}
origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

private char[] getReturnType(char[] methodSignature) {
  // skip type parameters
  int paren = CharOperation.lastIndexOf(')', methodSignature);
  // there could be thrown exceptions behind, thus scan one type exactly
  return CharOperation.subarray(methodSignature, paren + 1,
      methodSignature.length);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public char[][] getPackageName() {
  char[] typeName = this.initialTypeName.toCharArray();
  int lastIndex = CharOperation.lastIndexOf('/', typeName);
  return CharOperation.splitOn('/', typeName, 0, lastIndex);
}
public int hashCode() {
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

private char[] getReturnType(char[] methodSignature) {
  // skip type parameters
  int paren = CharOperation.lastIndexOf(')', methodSignature);
  // there could be thrown exceptions behind, thus scan one type exactly
  return CharOperation.subarray(methodSignature, paren + 1,
      methodSignature.length);
}
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public char[][] getPackageName() {
  char[] typeName = this.initialTypeName.toCharArray();
  int lastIndex = CharOperation.lastIndexOf('/', typeName);
  return CharOperation.splitOn('/', typeName, 0, lastIndex);
}
public int hashCode() {
origin: com.vaadin/vaadin-client-compiler-deps

private char[] getReturnType(char[] methodSignature) {
  // skip type parameters
  int paren = CharOperation.lastIndexOf(')', methodSignature);
  // there could be thrown exceptions behind, thus scan one type exactly
  return CharOperation.subarray(methodSignature, paren + 1,
      methodSignature.length);
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

public char[] getMainTypeName() {
  char[] typeName = this.initialTypeName.toCharArray();
  int lastIndex = CharOperation.lastIndexOf('/', typeName);
  return CharOperation.subarray(typeName, lastIndex + 1, -1);
}

origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private String returnClassName(char[] classInfoName) {
  if (classInfoName.length == 0) {
    return EMPTY_CLASS_NAME;
  } else if (isCompact()) {
    int lastIndexOfSlash = CharOperation.lastIndexOf('/', classInfoName);
    if (lastIndexOfSlash != -1) {
      return new String(classInfoName, lastIndexOfSlash + 1, classInfoName.length - lastIndexOfSlash - 1);
    }
  }
  CharOperation.replace(classInfoName, '/', '.');
  return new String(classInfoName);
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

private char[] returnClassName(char[] classInfoName, char separator, int mode) {
  if (classInfoName.length == 0) {
    return CharOperation.NO_CHAR;
  } else if (isCompact(mode)) {
    int lastIndexOfSlash = CharOperation.lastIndexOf(separator, classInfoName);
    if (lastIndexOfSlash != -1) {
      return CharOperation.subarray(classInfoName, lastIndexOfSlash + 1, classInfoName.length);
    }
  }
  return classInfoName;
}
origin: com.vaadin/vaadin-client-compiler-deps

private char[] returnClassName(char[] classInfoName, char separator, int mode) {
  if (classInfoName.length == 0) {
    return CharOperation.NO_CHAR;
  } else if (isCompact(mode)) {
    int lastIndexOfSlash = CharOperation.lastIndexOf(separator, classInfoName);
    if (lastIndexOfSlash != -1) {
      return CharOperation.subarray(classInfoName, lastIndexOfSlash + 1, classInfoName.length);
    }
  }
  return classInfoName;
}
origin: org.eclipse.jdt.core.compiler/ecj

public char[] normalizedPath() {
  if (this.normalizedPath == null) {
    String path2 = this.getPath();
    char[] rawName = path2.toCharArray();
    if (File.separatorChar == '\\') {
      CharOperation.replace(rawName, '\\', '/');
    }
    this.normalizedPath = CharOperation.subarray(rawName, 0, CharOperation.lastIndexOf('.', rawName));
  }
  return this.normalizedPath;
}
public String getPath() {
origin: org.eclipse.tycho/org.eclipse.jdt.core

public char[] normalizedPath() {
  if (this.normalizedPath == null) {
    String path2 = this.getPath();
    char[] rawName = path2.toCharArray();
    if (File.separatorChar == '\\') {
      CharOperation.replace(rawName, '\\', '/');
    }
    this.normalizedPath = CharOperation.subarray(rawName, 0, CharOperation.lastIndexOf('.', rawName));
  }
  return this.normalizedPath;
}
public String getPath() {
origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public char[] normalizedPath() {
  if (this.normalizedPath == null) {
    String path2 = this.getPath();
    char[] rawName = path2.toCharArray();
    if (File.separatorChar == '\\') {
      CharOperation.replace(rawName, '\\', '/');
    }
    this.normalizedPath = CharOperation.subarray(rawName, 0, CharOperation.lastIndexOf('.', rawName));
  }
  return this.normalizedPath;
}
@Override
origin: org.eclipse.scout.sdk.deps/ecj

public char[] normalizedPath() {
  if (this.normalizedPath == null) {
    String path2 = this.getPath();
    char[] rawName = path2.toCharArray();
    if (File.separatorChar == '\\') {
      CharOperation.replace(rawName, '\\', '/');
    }
    this.normalizedPath = CharOperation.subarray(rawName, 0, CharOperation.lastIndexOf('.', rawName));
  }
  return this.normalizedPath;
}
public String getPath() {
org.eclipse.jdt.core.compilerCharOperationlastIndexOf

Javadoc

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

For example:
  1.  
    toBeFound = 'c' 
    array = { ' a', 'b', 'c', 'd' , 'c', 'e' } 
    result => 4 
    
  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
  • 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
  • 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

  • Reactive rest calls using spring rest template
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • getSystemService (Context)
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Notification (javax.management)
  • JButton (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
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