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

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

Best Java code snippets using org.eclipse.jdt.core.compiler.CharOperation.prefixEquals (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
  protected void initRawPackageInfo(HashtableOfArrayToObject rawPackageInfo, String entryName, boolean isDirectory, String compliance) {
    char[] name = entryName.toCharArray();
    if (CharOperation.prefixEquals(ClasspathJMod.CLASSES_FOLDER, name)) {
      name = CharOperation.subarray(name, ClasspathJMod.CLASSES_FOLDER.length, name.length);
    }
    super.initRawPackageInfo(rawPackageInfo, new String(name), isDirectory, compliance);
  }
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

  protected void initRawPackageInfo(HashtableOfArrayToObject rawPackageInfo, String entryName, boolean isDirectory, String compliance) {
    char[] name = entryName.toCharArray();
    if (CharOperation.prefixEquals(ClasspathJMod.CLASSES_FOLDER, name)) {
      name = CharOperation.subarray(name, ClasspathJMod.CLASSES_FOLDER.length, name.length);
    }
    super.initRawPackageInfo(rawPackageInfo, new String(name), isDirectory, compliance);
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

public void generateSyntheticFinalFieldInitialization(CodeStream codeStream) {
  if (this.synthetics == null || this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
    return;
  Collection<FieldBinding> syntheticFields = this.synthetics[SourceTypeBinding.FIELD_EMUL].values();
  for (FieldBinding field : syntheticFields) {
    if (CharOperation.prefixEquals(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, field.name)) {
      MethodBinding[] accessors = (MethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(new String(field.name));
      if (accessors == null || accessors[0] == null) // not a field for switch enum
        continue;
      codeStream.invoke(Opcodes.OPC_invokestatic, accessors[0], null /* default declaringClass */);
      codeStream.fieldAccess(Opcodes.OPC_putstatic, field, null /* default declaringClass */);
    }
  }
}
/* Answer the synthetic field for <actualOuterLocalVariable>
origin: org.eclipse.tycho/org.eclipse.jdt.core

public void generateSyntheticFinalFieldInitialization(CodeStream codeStream) {
  if (this.synthetics == null || this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
    return;
  Collection<FieldBinding> syntheticFields = this.synthetics[SourceTypeBinding.FIELD_EMUL].values();
  for (FieldBinding field : syntheticFields) {
    if (CharOperation.prefixEquals(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, field.name)) {
      MethodBinding[] accessors = (MethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(new String(field.name));
      if (accessors == null || accessors[0] == null) // not a field for switch enum
        continue;
      codeStream.invoke(Opcodes.OPC_invokestatic, accessors[0], null /* default declaringClass */);
      codeStream.fieldAccess(Opcodes.OPC_putstatic, field, null /* default declaringClass */);
    }
  }
}
/* Answer the synthetic field for <actualOuterLocalVariable>
origin: org.eclipse.tycho/org.eclipse.jdt.core

int computeRelevanceForCaseMatching(char[] token, char[] proposalName){
  if(CharOperation.equals(token, proposalName, true)) {
    return R_EXACT_NAME + R_CASE;
  } else if(CharOperation.equals(token, proposalName, false)) {
    return R_EXACT_NAME;
  } else if (CharOperation.prefixEquals(token, proposalName, false)) {
    if (CharOperation.prefixEquals(token, proposalName, true))
      return R_CASE;
  } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){
      return R_CAMEL_CASE;
  } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) {
    return R_SUBSTRING;
  }
  return 0;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

int computeRelevanceForCaseMatching(char[] token, char[] proposalName){
  if(CharOperation.equals(token, proposalName, true)) {
    return R_EXACT_NAME + R_CASE;
  } else if(CharOperation.equals(token, proposalName, false)) {
    return R_EXACT_NAME;
  } else if (CharOperation.prefixEquals(token, proposalName, false)) {
    if (CharOperation.prefixEquals(token, proposalName, true))
      return R_CASE;
  } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){
      return R_CAMEL_CASE;
  } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) {
    return R_SUBSTRING;
  }
  return 0;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

int computeRelevanceForCaseMatching(char[] token, char[] proposalName){
  if(CharOperation.equals(token, proposalName, true)) {
    return R_EXACT_NAME + R_CASE;
  } else if(CharOperation.equals(token, proposalName, false)) {
    return R_EXACT_NAME;
  } else if (CharOperation.prefixEquals(token, proposalName, false)) {
    if (CharOperation.prefixEquals(token, proposalName, true))
      return R_CASE;
  } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){
      return R_CAMEL_CASE;
  } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) {
    return R_SUBSTRING;
  }
  return 0;
}
origin: org.eclipse.jdt.core.compiler/ecj

private TypeBinding safeType(TypeBinding type) {
  if (type != null && type.isLocalType()) {
    MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod;
    if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector))
      return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable
  }
  return type;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private TypeBinding safeType(TypeBinding type) {
  if (type != null && type.isLocalType()) {
    MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod;
    if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector))
      return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable
  }
  return type;
}
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private TypeBinding safeType(TypeBinding type) {
  if (type != null && type.isLocalType()) {
    MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod;
    if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector))
      return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable
  }
  return type;
}
origin: org.eclipse.scout.sdk.deps/ecj

private TypeBinding safeType(TypeBinding type) {
  if (type != null && type.isLocalType()) {
    MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod;
    if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector))
      return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable
  }
  return type;
}
origin: com.vaadin/vaadin-client-compiler-deps

private TypeBinding safeType(TypeBinding type) {
  if (type != null && type.isLocalType()) {
    MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod;
    if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector))
      return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable
  }
  return type;
}
origin: trylimits/Eclipse-Postfix-Code-Completion

private TypeBinding safeType(TypeBinding type) {
  if (type != null && type.isLocalType()) {
    MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod;
    if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector))
      return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable
  }
  return type;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private void acceptName(char[] name) {
  // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570
  if (name == null) return;
  if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */)
      && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return;
  if (this.acceptedNames.includes(name)) return;
  this.acceptedNames.add(name);
  // accept result
  this.requestor.acceptName(name);
}
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private void acceptName(char[] name) {
  // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570
  if (name == null) return;
  if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */)
      && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return;
  if (this.acceptedNames.includes(name)) return;
  this.acceptedNames.add(name);
  // accept result
  this.requestor.acceptName(name);
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

private void acceptName(char[] name) {
  // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570
  if (name == null) return;
  if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */)
      && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return;
  if (this.acceptedNames.includes(name)) return;
  this.acceptedNames.add(name);
  // accept result
  this.requestor.acceptName(name);
}
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

private void acceptName(char[] name) {
  // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570
  if (name == null) return;
  if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */)
      && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return;
  if (this.acceptedNames.includes(name)) return;
  this.acceptedNames.add(name);
  // accept result
  this.requestor.acceptName(name);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private void acceptName(char[] name) {
  // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570
  if (name == null) return;
  if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */)
      && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return;
  if (this.acceptedNames.includes(name)) return;
  this.acceptedNames.add(name);
  // accept result
  this.requestor.acceptName(name);
}
origin: trylimits/Eclipse-Postfix-Code-Completion

private void acceptName(char[] name) {
  // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570
  if (name == null) return;
  if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */)
      && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return;
  if (this.acceptedNames.includes(name)) return;
  this.acceptedNames.add(name);
  // accept result
  this.requestor.acceptName(name);
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

private TypeBinding safeType(TypeBinding type) {
  if (type != null && type.isLocalType()) {
    MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod;
    if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) {
      // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable
      if (type.superclass().id == TypeIds.T_JavaLangObject && type.superInterfaces().length > 0)
        return type.superInterfaces()[0];
      return type.superclass();
    }
  }
  return type;
}
org.eclipse.jdt.core.compilerCharOperationprefixEquals

Javadoc

Answers true if the given name starts with the given prefix, false otherwise. The comparison is case sensitive.

For example:
  1.  
    prefix = { 'a' , 'b' } 
    name = { 'a' , 'b', 'b', 'a', 'b', 'a' } 
    result => true 
    
  2.  
    prefix = { 'a' , 'c' } 
    name = { 'a' , 'b', 'b', 'a', 'b', 'a' } 
    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,
  • fragmentEquals,
  • isWhitespace,
  • match,
  • replaceOnCopy,
  • hashCode,
  • 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