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

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

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

@Override
public void consumePackage(char[] pkgName) {
  this.compoundName = CharOperation.splitOn('/', pkgName);
  this.compilerBinding = new PackageBinding(this.compoundName, null, this.environment, this.environment.module); //TODO(SHMOD) enclosingModule
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

protected static String[] readNameTable(String filename) throws java.io.IOException {
  char[] contents = readTable(filename);
  char[][] nameAsChar = CharOperation.splitOn('\n', contents);

  String[] result = new String[nameAsChar.length + 1];
  result[0] = null;
  for (int i = 0; i < nameAsChar.length; i++) {
    result[i + 1] = new String(nameAsChar[i]);
  }

  return result;
}
protected static String[] readReadableNameTable(String filename){
origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * EXTERNAL API
 * Answer the compound name of the class file.
 * @return char[][]
 * e.g. {{java}, {util}, {Hashtable}}.
 */
public char[][] getCompoundName() {
  return CharOperation.splitOn('/', fileName());
}
origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

/**
 * EXTERNAL API
 * Answer the compound name of the class file.
 * @return char[][]
 * e.g. {{java}, {util}, {Hashtable}}.
 */
public char[][] getCompoundName() {
  return CharOperation.splitOn('/', fileName());
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public static char[][][] internQualifiedNames(StringSet qualifiedStrings) {
  if (qualifiedStrings == null) return EmptyQualifiedNames;
  int length = qualifiedStrings.elementSize;
  if (length == 0) return EmptyQualifiedNames;

  char[][][] result = new char[length][][];
  String[] strings = qualifiedStrings.values;
  for (int i = 0, l = strings.length; i < l; i++)
    if (strings[i] != null)
      result[--length] = CharOperation.splitOn('/', strings[i].toCharArray());
  return internQualifiedNames(result, false);
}

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

/**
 * EXTERNAL API
 * Answer the compound name of the class file.
 * @return char[][]
 * e.g. {{java}, {util}, {Hashtable}}.
 */
public char[][] getCompoundName() {
  return CharOperation.splitOn('/', fileName());
}
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public static char[][][] internQualifiedNames(StringSet qualifiedStrings) {
  if (qualifiedStrings == null) return EmptyQualifiedNames;
  int length = qualifiedStrings.elementSize;
  if (length == 0) return EmptyQualifiedNames;

  char[][][] result = new char[length][][];
  String[] strings = qualifiedStrings.values;
  for (int i = 0, l = strings.length; i < l; i++)
    if (strings[i] != null)
      result[--length] = CharOperation.splitOn('/', strings[i].toCharArray());
  return internQualifiedNames(result, false);
}

origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * EXTERNAL API
 * Answer the compound name of the class file.
 * @return char[][]
 * e.g. {{java}, {util}, {Hashtable}}.
 */
public char[][] getCompoundName() {
  return CharOperation.splitOn('/', fileName());
}
origin: com.vaadin/vaadin-client-compiler-deps

/**
 * EXTERNAL API
 * Answer the compound name of the class file.
 * @return char[][]
 * e.g. {{java}, {util}, {Hashtable}}.
 */
public char[][] getCompoundName() {
  return CharOperation.splitOn('/', fileName());
}
origin: org.eclipse.jdt.core.compiler/ecj

protected static String[] readNameTable(String filename) throws java.io.IOException {
  char[] contents = readTable(filename);
  char[][] nameAsChar = CharOperation.splitOn('\n', contents);

  String[] result = new String[nameAsChar.length + 1];
  result[0] = null;
  for (int i = 0; i < nameAsChar.length; i++) {
    result[i + 1] = new String(nameAsChar[i]);
  }

  return result;
}
protected static String[] readReadableNameTable(String filename){
origin: org.eclipse.jdt/org.eclipse.jdt.compiler.apt

@Override
public TypeElement getTypeElement(CharSequence name) {
  final char[][] compoundName = CharOperation.splitOn('.', name.toString().toCharArray());
  Set<? extends ModuleElement> allModuleElements = getAllModuleElements();
  for (ModuleElement moduleElement : allModuleElements) {
    TypeElement t = getTypeElement(compoundName, ((ModuleElementImpl) moduleElement).binding);
    if (t != null) {
      return t;
    }
  }
  return null;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

public PossibleMatch(MatchLocator locator, IResource resource, Openable openable, SearchDocument document, boolean mustResolve) {
  this.resource = resource;
  this.openable = openable;
  this.document = document;
  this.nodeSet = new MatchingNodeSet(mustResolve);
  char[] qualifiedName = getQualifiedName();
  if (qualifiedName != null)
    this.compoundName = CharOperation.splitOn('.', qualifiedName);
}
public void cleanUp() {
origin: org.eclipse.jdt/org.eclipse.jdt.core

private AccessRestriction getViolatedRestriction(String typeName, String packageName, ClasspathEntry entry, AccessRestriction accessRestriction) {
  AccessRuleSet accessRuleSet = entry.getAccessRuleSet();
  if (accessRuleSet != null) {
    // TODO (philippe) improve char[] <-> String conversions to avoid performing them on the fly
    char[][] packageChars = CharOperation.splitOn('.', packageName.toCharArray());
    char[] typeChars = typeName.toCharArray();
    accessRestriction = accessRuleSet.getViolatedRestriction(CharOperation.concatWith(packageChars, typeChars, '/'));
  }
  return accessRestriction;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public TypeBinding[] getUses() {
  if (this.uses == null) {
    this.uses = new TypeBinding[this.unresolvedUses.length];
    for (int i = 0; i < this.unresolvedUses.length; i++)
      this.uses[i] = this.environment.getType(CharOperation.splitOn('.', this.unresolvedUses[i]), this);
  }
  return super.getUses();
}

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

@Override
public TypeBinding[] getUses() {
  if (this.uses == null) {
    this.uses = new TypeBinding[this.unresolvedUses.length];
    for (int i = 0; i < this.unresolvedUses.length; i++)
      this.uses[i] = this.environment.getType(CharOperation.splitOn('.', this.unresolvedUses[i]), this);
  }
  return super.getUses();
}

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

@Override
public void addExports(char[] packageName, char[][] targetModules) {
  PackageBinding declaredPackage = getVisiblePackage(CharOperation.splitOn('.', packageName));
  if (declaredPackage != null && declaredPackage.isValidBinding())
    addResolvedExport(declaredPackage, targetModules);
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

public void acceptType(
    char[] packageName,
    char[] typeName,
    char[][] enclosingTypeNames,
    int modifiers,
    AccessRestriction accessRestriction) {
  char[] fullyQualifiedName = CharOperation.concat(packageName, CharOperation.concat(CharOperation.concatWith(enclosingTypeNames, '.'), typeName, '.'), '.');
  if (isQualified && !CharOperation.endsWith(fullyQualifiedName, missingFullyQualifiedName)) return;
  char[][] compoundName = CharOperation.splitOn('.', fullyQualifiedName);
  results.add(compoundName);
}
origin: org.eclipse.jdt.core.compiler/ecj

public BinaryTypeBinding cacheBinaryType(IBinaryType binaryType, boolean needFieldsAndMethods, AccessRestriction accessRestriction) {
  char[][] compoundName = CharOperation.splitOn('/', binaryType.getName());
  ReferenceBinding existingType = getCachedType(compoundName);

  if (existingType == null || existingType instanceof UnresolvedReferenceBinding)
    // only add the binary type if its not already in the cache
    return createBinaryTypeFrom(binaryType, computePackageFrom(compoundName, false /* valid pkg */), needFieldsAndMethods, accessRestriction);
  return null; // the type already exists & can be retrieved from the cache
}

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

public BinaryTypeBinding cacheBinaryType(IBinaryType binaryType, boolean needFieldsAndMethods, AccessRestriction accessRestriction) {
  char[][] compoundName = CharOperation.splitOn('/', binaryType.getName());
  ReferenceBinding existingType = getCachedType(compoundName);

  if (existingType == null || existingType instanceof UnresolvedReferenceBinding)
    // only add the binary type if its not already in the cache
    return createBinaryTypeFrom(binaryType, computePackageFrom(compoundName, false /* valid pkg */), needFieldsAndMethods, accessRestriction);
  return null; // the type already exists & can be retrieved from the cache
}

origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

public BinaryTypeBinding cacheBinaryType(IBinaryType binaryType, boolean needFieldsAndMethods, AccessRestriction accessRestriction) {
  char[][] compoundName = CharOperation.splitOn('/', binaryType.getName());
  ReferenceBinding existingType = getCachedType(compoundName);

  if (existingType == null || existingType instanceof UnresolvedReferenceBinding)
    // only add the binary type if its not already in the cache
    return createBinaryTypeFrom(binaryType, computePackageFrom(compoundName, false /* valid pkg */), needFieldsAndMethods, accessRestriction);
  return null; // the type already exists & can be retrieved from the cache
}

org.eclipse.jdt.core.compilerCharOperationsplitOn

Javadoc

Return a new array which is the split of the given array using the given divider.

For example:
  1.  
    divider = 'b' 
    array = { 'a' , 'b', 'b', 'a', 'b', 'a' } 
    result => { { 'a' }, {  }, { 'a' }, { 'a' } } 
    
  2.  
    divider = 'c' 
    array = { 'a' , 'b', 'b', 'a', 'b', 'a' } 
    result => { { 'a', 'b', 'b', 'a', 'b', 'a' } } 
    
  3.  
    divider = 'c' 
    array = { ' ', ' ', 'a' , 'b', 'b', 'a', 'b', 'a', ' ' } 
    result => { { ' ', 'a', 'b', 'b', 'a', 'b', 'a', ' ' } } 
    

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
  • 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

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • JPanel (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
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