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

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

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

private int computeRelevanceForException(char[] proposalName){
  if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&&
    (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) ||
    CharOperation.match(ERROR_PATTERN, proposalName, false))) {
    return R_EXCEPTION;
  }
  return 0;
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

private int computeRelevanceForException(char[] proposalName){
  if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&&
    (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) ||
    CharOperation.match(ERROR_PATTERN, proposalName, false))) {
    return R_EXCEPTION;
  }
  return 0;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private int computeRelevanceForException(char[] proposalName){
  if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&&
    (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) ||
    CharOperation.match(ERROR_PATTERN, proposalName, false))) {
    return R_EXCEPTION;
  }
  return 0;
}
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private int computeRelevanceForException(char[] proposalName){
  if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&&
    (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) ||
    CharOperation.match(ERROR_PATTERN, proposalName, false))) {
    return R_EXCEPTION;
  }
  return 0;
}
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

private int computeRelevanceForException(char[] proposalName){
  if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&&
    (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) ||
    CharOperation.match(ERROR_PATTERN, proposalName, false))) {
    return R_EXCEPTION;
  }
  return 0;
}
origin: trylimits/Eclipse-Postfix-Code-Completion

private int computeRelevanceForException(char[] proposalName){
  if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&&
    (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) ||
    CharOperation.match(ERROR_PATTERN, proposalName, false))) {
    return R_EXCEPTION;
  }
  return 0;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) {
  // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase
  char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification);
  if (wildcardPattern == null) return true;
  return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive);
}
/**
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) {
  // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase
  char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification);
  if (wildcardPattern == null) return true;
  return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive);
}
/**
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) {
  // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase
  char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification);
  if (wildcardPattern == null) return true;
  return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive);
}
/**
origin: org.eclipse.tycho/org.eclipse.jdt.core

private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) {
  // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase
  char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification);
  if (wildcardPattern == null) return true;
  return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive);
}
/**
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) {
  // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase
  char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification);
  if (wildcardPattern == null) return true;
  return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive);
}
/**
origin: trylimits/Eclipse-Postfix-Code-Completion

private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) {
  // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase
  char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification);
  if (wildcardPattern == null) return true;
  return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive);
}
/**
origin: org.eclipse.jdt/org.eclipse.jdt.core

private boolean methodParametersEqualsPattern(MethodBinding method) {
  TypeBinding[] methodParameters = method.parameters;

  int length = methodParameters.length;
  if (length != this.pattern.parameterSimpleNames.length) return false;

  for (int i = 0; i < length; i++) {
    char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]);
    if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) {
      return false;
    }
  }
  return true;
}
@Override
origin: org.eclipse.tycho/org.eclipse.jdt.core

private boolean methodParametersEqualsPattern(MethodBinding method) {
  TypeBinding[] methodParameters = method.parameters;

  int length = methodParameters.length;
  if (length != this.pattern.parameterSimpleNames.length) return false;

  for (int i = 0; i < length; i++) {
    char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]);
    if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) {
      return false;
    }
  }
  return true;
}
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private boolean methodParametersEqualsPattern(MethodBinding method) {
  TypeBinding[] methodParameters = method.parameters;

  int length = methodParameters.length;
  if (length != this.pattern.parameterSimpleNames.length) return false;

  for (int i = 0; i < length; i++) {
    char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]);
    if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) {
      return false;
    }
  }
  return true;
}
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

private boolean methodParametersEqualsPattern(MethodBinding method) {
  TypeBinding[] methodParameters = method.parameters;

  int length = methodParameters.length;
  if (length != this.pattern.parameterSimpleNames.length) return false;

  for (int i = 0; i < length; i++) {
    char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]);
    if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) {
      return false;
    }
  }
  return true;
}
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private boolean methodParametersEqualsPattern(MethodBinding method) {
  TypeBinding[] methodParameters = method.parameters;

  int length = methodParameters.length;
  if (length != this.pattern.parameterSimpleNames.length) return false;

  for (int i = 0; i < length; i++) {
    char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]);
    if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) {
      return false;
    }
  }
  return true;
}
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
origin: trylimits/Eclipse-Postfix-Code-Completion

private boolean methodParametersEqualsPattern(MethodBinding method) {
  TypeBinding[] methodParameters = method.parameters;

  int length = methodParameters.length;
  if (length != this.pattern.parameterSimpleNames.length) return false;

  for (int i = 0; i < length; i++) {
    char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]);
    if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) {
      return false;
    }
  }
  return true;
}
public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e.nls

 @Override
 public boolean select(Viewer viewer, Object parentElement, Object element) {
  String text;
  INlsEntry nlsEntry = (INlsEntry) element;
  if (m_lang == Language.LANGUAGE_KEY) {
   text = nlsEntry.getKey();
  }
  else {
   text = nlsEntry.getTranslation(m_lang);
  }
  if (text == null) {
   text = "";
  }
  text = StringUtils.remove(text, '&');
  return CharOperation.match(m_pattern.toCharArray(), text.toCharArray(), false);
 }
} // end class P_ViewerFilter
origin: org.eclipse.jdt/org.eclipse.jdt.core

boolean filterExtraResource(IResource resource) {
  if (this.extraResourceFileFilters != null) {
    char[] name = resource.getName().toCharArray();
    for (int i = 0, l = this.extraResourceFileFilters.length; i < l; i++)
      if (CharOperation.match(this.extraResourceFileFilters[i], name, true))
        return true;
  }
  if (this.extraResourceFolderFilters != null) {
    IPath path = resource.getProjectRelativePath();
    String pathName = path.toString();
    int count = path.segmentCount();
    if (resource.getType() == IResource.FILE) count--;
    for (int i = 0, l = this.extraResourceFolderFilters.length; i < l; i++)
      if (pathName.indexOf(this.extraResourceFolderFilters[i]) != -1)
        for (int j = 0; j < count; j++)
          if (this.extraResourceFolderFilters[i].equals(path.segment(j)))
            return true;
  }
  return false;
}

org.eclipse.jdt.core.compilerCharOperationmatch

Javadoc

Answers true if the pattern matches the given name, false otherwise. This char[] pattern matching accepts wild-cards '*' and '?'.

When not case sensitive, the pattern is assumed to already be lowercased, the name will be lowercased character per character as comparing.
If name is null, the answer is false.
If pattern is null, the answer is true if name is not null.

For example:
  1.  
    pattern = { '?', 'b', '*' } 
    name = { 'a', 'b', 'c' , 'd' } 
    isCaseSensitive = true 
    result => true 
    
  2.  
    pattern = { '?', 'b', '?' } 
    name = { 'a', 'b', 'c' , 'd' } 
    isCaseSensitive = true 
    result => false 
    
  3.  
    pattern = { 'b', '*' } 
    name = { 'a', 'b', 'c' , 'd' } 
    isCaseSensitive = true 
    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,
  • replaceOnCopy,
  • hashCode,
  • prefixEquals,
  • 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