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

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

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

  @Override
  public boolean onAccess(char[][] tokens, int index) {
    return !CharOperation.equals(tokens[index + 1], tokens[tokens.length - 1]);
  }
});
origin: INRIA/spoon

for (int i = 0; i < packageName.length; i++) {
  char[] chars = packageName[i];
  if (!CharOperation.equals(chars, tokens[i])) {
    isFound = false;
    break;
origin: INRIA/spoon

/**
 * Checks if the qualified name reference is a problem field binding and have a valid field.
 *
 * @param qualifiedNameReference
 *         Reference which should contains a problem field binding.
 * @return true if the qualified name reference is a valid problem field binding.
 */
static boolean isValidProblemBindingField(QualifiedNameReference qualifiedNameReference) {
  return qualifiedNameReference.binding instanceof ProblemFieldBinding && !((FieldBinding) qualifiedNameReference.binding).declaringClass.isAnonymousType()
      && qualifiedNameReference.tokens.length - 1 == ((FieldBinding) qualifiedNameReference.binding).declaringClass.compoundName.length && CharOperation
      .equals(CharOperation.subarray(qualifiedNameReference.tokens, 0, qualifiedNameReference.tokens.length - 1),
          ((FieldBinding) qualifiedNameReference.binding).declaringClass.compoundName);
}
origin: org.eclipse.jdt.core.compiler/ecj

public boolean equals(Object obj) {
  if (obj instanceof ExceptionMarker) {
    ExceptionMarker marker = (ExceptionMarker) obj;
    return this.pc == marker.pc && CharOperation.equals(this.constantPoolName, marker.constantPoolName);
  }
  return false;
}
public int hashCode() {
origin: org.eclipse.jdt.core.compiler/ecj

public TypeVariableBinding getTypeVariable(char[] variableName) {
  for (int i = this.typeVariables.length; --i >= 0;)
    if (CharOperation.equals(this.typeVariables[i].sourceName, variableName))
      return this.typeVariables[i];
  return null;
}

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

private boolean isPackageOfQualifiedTypeName(char[][] packageName, char[][] typeName) {
  int length;
  if (typeName == null || (length = packageName.length) != typeName.length -1)
    return false;
  for (int i=0; i<length; i++)
    if (!CharOperation.equals(packageName[i], typeName[i]))
      return false;
  return true;
}

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

protected int applyCloseableInterfaceWhitelists() {
  switch (this.compoundName.length) {
    case 4:
      if (CharOperation.equals(this.compoundName, TypeConstants.RESOURCE_FREE_CLOSEABLE_STREAM))
        return TypeIds.BitResourceFreeCloseable;
      break;
  }
  return 0;
}

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

public final boolean isDuplicateLocalVariable(char[] name) {
  BlockScope current = this;
  while (true) {
    for (int i = 0; i < this.localIndex; i++) {
      if (CharOperation.equals(name, current.locals[i].name))
        return true;
    }
    if (current.kind != Scope.BLOCK_SCOPE) return false;
    current = (BlockScope)current.parent;
  }
}

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

public LocalVariableBinding findVariable(char[] variableName) {
  int varLength = variableName.length;
  for (int i = this.localIndex-1; i >= 0; i--) { // lookup backward to reach latest additions first
    LocalVariableBinding local;
    char[] localName;
    if ((localName = (local = this.locals[i]).name).length == varLength && CharOperation.equals(localName, variableName))
      return local;
  }
  return null;
}

origin: INRIA/spoon

if (CharOperation.equals(argument.name, singleNameReference.token)) {
  CtTypeReference<?> declaringType = null;
  if (lambdaJDT.enclosingScope instanceof MethodScope) {
origin: org.eclipse.jdt.core.compiler/ecj

boolean isMissingType(char[] typeName) {
  for (int i = this.missingTypes == null ? 0 : this.missingTypes.size(); --i >= 0;) {
    MissingTypeBinding missingType = (MissingTypeBinding) this.missingTypes.get(i);
    if (CharOperation.equals(missingType.sourceName, typeName))
      return true;
  }
  return false;
}

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

@Override
public boolean equals(Object o) {
  if (this == o) 
    return true;
  if (!(o instanceof IModule.IModuleReference))
    return false;
  IModule.IModuleReference mod = (IModule.IModuleReference) o;
  if (this.modifiers != mod.getModifiers())
    return false;
  return CharOperation.equals(this.refName, mod.name(), false);
}
@Override
origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public boolean equals(Object o) {
  if (!(o instanceof FieldInfo)) {
    return false;
  }
  return CharOperation.equals(getName(), ((FieldInfo) o).getName());
}
@Override
origin: org.eclipse.jdt/org.eclipse.jdt.core

  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof SyntheticLocalVariableBinding))
      return false;
    return CharOperation.equals(computeUniqueKey(), ((SyntheticLocalVariableBinding) obj).computeUniqueKey());
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public boolean equals(Object o) {
  if (this == o) 
    return true;
  if (!(o instanceof IModule.IModuleReference))
    return false;
  IModule.IModuleReference mod = (IModule.IModuleReference) o;
  if (this.modifiers != mod.getModifiers())
    return false;
  return CharOperation.equals(this.name, mod.name());
}
@Override
origin: org.eclipse.tycho/org.eclipse.jdt.core

@Override
public boolean equals(Object o) {
  if (!(o instanceof MethodInfo)) {
    return false;
  }
  MethodInfo otherMethod = (MethodInfo) o;
  return CharOperation.equals(getSelector(), otherMethod.getSelector())
      && CharOperation.equals(getMethodDescriptor(), otherMethod.getMethodDescriptor());
}
@Override
origin: org.eclipse.tycho/org.eclipse.jdt.core

public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction) {
  if (!CharOperation.equals(sourceUnit.getMainTypeName(), TypeConstants.PACKAGE_INFO_NAME)) {
    // do not accept package-info.java as a type for completion engine
    // because it contains no extra info that will help in completion
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=343865
    // Required after the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=337868
    // because now we get a type corresponding to the package-info.java from the java model.
    super.accept(sourceUnit, accessRestriction);
  }
}

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

public NameEnvironmentAnswer findSecondaryInClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName) {
  //"package-info" is a reserved class name and can never be a secondary type (it is much faster to stop the search here).
  if(CharOperation.equals(TypeConstants.PACKAGE_INFO_NAME, typeName)) {
    return null;
  }

  String typeNameString = new String(typeName);
  String moduleName = this.module != null ? String.valueOf(this.module.name()) : null; // TODO(SHMOD): test for ModuleBinding.ANY & UNNAMED
  boolean prereqs = this.options != null && isPackage(qualifiedPackageName, moduleName) && ((this.mode & SOURCE) != 0) && doesFileExist(typeNameString + SUFFIX_STRING_java, qualifiedPackageName);
  return prereqs ? null : findSourceSecondaryType(typeNameString, qualifiedPackageName, qualifiedBinaryFileName); /* only secondary types */
}

origin: INRIA/spoon

if (CharOperation.equals(anImport.getImportName()[anImport.getImportName().length - 1], expectedName)) {
  if (anImport.isStatic()) {
    int indexDeclaring = 2;
origin: org.eclipse.jdt.core.compiler/ecj

void checkLabelValidity(BlockScope scope) {
  // check if label was already defined above
  FlowContext current = this.getLocalParent();
  while (current != null) {
    char[] currentLabelName;
    if (((currentLabelName = current.labelName()) != null)
      && CharOperation.equals(currentLabelName, this.labelName)) {
      scope.problemReporter().alreadyDefinedLabel(this.labelName, this.associatedNode);
    }
    current = current.getLocalParent();
  }
}

org.eclipse.jdt.core.compilerCharOperationequals

Javadoc

Answers true if the two arrays are identical character by character, otherwise false. The equality is case sensitive.

For example:
  1.  
    first = null 
    second = null 
    result => true 
    
  2.  
    first = { } 
    second = null 
    result => false 
    
  3.  
    first = { 'a' } 
    second = { 'a' } 
    result => true 
    
  4.  
    first = { 'a' } 
    second = { 'A' } 
    result => false 
    

Popular methods of CharOperation

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