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

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

Best Java code snippets using org.eclipse.jdt.core.compiler.CharOperation.replaceOnCopy (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 consumeFullyQualifiedName(char[] fullyQualifiedName) {
  this.typeSigStart = this.signature.length();
  this.signature.append('L');
  if (!this.asBinarySignature)
    fullyQualifiedName = CharOperation.replaceOnCopy(fullyQualifiedName, '/', '.');
  this.signature.append(fullyQualifiedName);
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private static char[] getRequiredTypeSignature(TypeBinding typeBinding) {
  char[] result = null;
  StringBuffer sig = new StringBuffer(10);
  sig.append(typeBinding.signature());
  int sigLength = sig.length();
  result = new char[sigLength];
  sig.getChars(0, sigLength, result, 0);
  result = CharOperation.replaceOnCopy(result, '/', '.');
  return result;
}

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

@Override
public void consumeFullyQualifiedName(char[] fullyQualifiedName) {
  try {
    this.element = this.project.findType(new String(CharOperation.replaceOnCopy(fullyQualifiedName, '/', '.')), this.owner);
  } catch (JavaModelException e) {
    this.exception = e;
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

public static char[] getTypeSignature(TypeBinding typeBinding) {
  char[] result = typeBinding.signature();
  if (result != null) {
    result = CharOperation.replaceOnCopy(result, '/', '.');
  }
  return result;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public void consumePackage(char[] pkgName) {
  pkgName = CharOperation.replaceOnCopy(pkgName, '/', '.');
  try {
    this.element = this.project.findPackageFragment(new String(pkgName));
  } catch (JavaModelException e) {
    this.exception = e;
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

  public static char[] getSignature(TypeBinding typeBinding) {
    char[] result = null;

    result = typeBinding.genericTypeSignature();

    if (result != null) {
      result = CharOperation.replaceOnCopy(result, '/', '.');
    }
    return result;
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private char[] getSignatureForField(char[] fieldDescriptor) {
  char[] newFieldDescriptor = CharOperation.replaceOnCopy(fieldDescriptor, '/', '.');
  newFieldDescriptor = CharOperation.replaceOnCopy(newFieldDescriptor, '$', '%');
  char[] fieldDescriptorSignature = Signature.toCharArray(newFieldDescriptor);
  CharOperation.replace(fieldDescriptorSignature, '%', '$');
  return fieldDescriptorSignature;
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

private static char[] getRequiredTypeSignature(TypeBinding typeBinding) {
  char[] result = null;
  StringBuffer sig = new StringBuffer(10);
  sig.append(typeBinding.signature());
  int sigLength = sig.length();
  result = new char[sigLength];
  sig.getChars(0, sigLength, result, 0);
  result = CharOperation.replaceOnCopy(result, '/', '.');
  return result;
}

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

  public static char[] getSignature(TypeBinding typeBinding) {
    char[] result = null;

    result = typeBinding.genericTypeSignature();

    if (result != null) {
      result = CharOperation.replaceOnCopy(result, '/', '.');
    }
    return result;
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public void consumeFullyQualifiedName(char[] fullyQualifiedName) {
  try {
    this.element = this.project.findType(new String(CharOperation.replaceOnCopy(fullyQualifiedName, '/', '.')), this.owner);
  } catch (JavaModelException e) {
    this.exception = e;
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private static char[] getRequiredTypeSignature(TypeBinding typeBinding) {
  char[] result = null;
  StringBuffer sig = new StringBuffer(10);
  sig.append(typeBinding.signature());
  int sigLength = sig.length();
  result = new char[sigLength];
  sig.getChars(0, sigLength, result, 0);
  result = CharOperation.replaceOnCopy(result, '/', '.');
  return result;
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public static char[] getTypeSignature(TypeBinding typeBinding) {
  char[] result = typeBinding.signature();
  if (result != null) {
    result = CharOperation.replaceOnCopy(result, '/', '.');
  }
  return result;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private static String getTypeSignature(JavaModelManager manager, TypeBinding type) {
  char[] signature = type.genericTypeSignature();
  signature = CharOperation.replaceOnCopy(signature, '/', '.');
  return manager.intern(new String(signature));
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

private static String getTypeSignature(JavaModelManager manager, TypeBinding type) {
  char[] signature = type.genericTypeSignature();
  signature = CharOperation.replaceOnCopy(signature, '/', '.');
  return manager.intern(new String(signature));
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private static String getTypeSignature(JavaModelManager manager, TypeBinding type) {
  char[] signature = type.genericTypeSignature();
  signature = CharOperation.replaceOnCopy(signature, '/', '.');
  return manager.intern(new String(signature));
}
origin: org.eclipse.jdt.core.compiler/ecj

@Override
public Name getBinaryName(TypeElement type) {
  TypeElementImpl typeElementImpl = (TypeElementImpl) type;
  ReferenceBinding referenceBinding = (ReferenceBinding) typeElementImpl._binding;
  return new NameImpl(
    CharOperation.replaceOnCopy(referenceBinding.constantPoolName(), '/', '.'));
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

public static char[] createNonGenericTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName) {
  return Signature.createCharArrayTypeSignature(
      CharOperation.concat(
          qualifiedPackageName,
          CharOperation.replaceOnCopy(qualifiedTypeName, '.', '$'), '.'), true);
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private String getReturnType(IBinaryMethod info) {
  char[] genericSignature = info.getGenericSignature();
  char[] signature = genericSignature == null ? info.getMethodDescriptor() : genericSignature;
  char[] dotBasedSignature = CharOperation.replaceOnCopy(signature, '/', '.');
  String returnTypeName= Signature.getReturnType(new String(dotBasedSignature));
  return new String(ClassFile.translatedName(returnTypeName.toCharArray()));
}
/*
origin: org.eclipse.tycho/org.eclipse.jdt.core

private String getReturnType(IBinaryMethod info) {
  char[] genericSignature = info.getGenericSignature();
  char[] signature = genericSignature == null ? info.getMethodDescriptor() : genericSignature;
  char[] dotBasedSignature = CharOperation.replaceOnCopy(signature, '/', '.');
  String returnTypeName= Signature.getReturnType(new String(dotBasedSignature));
  return new String(ClassFile.translatedName(returnTypeName.toCharArray()));
}
/*
origin: org.eclipse.jdt/org.eclipse.jdt.core

LambdaExpression(JavaElement parent, org.eclipse.jdt.internal.compiler.ast.LambdaExpression lambdaExpression) {
  super(parent, new String(CharOperation.NO_CHAR));
  this.sourceStart = lambdaExpression.sourceStart;
  this.sourceEnd = lambdaExpression.sourceEnd;
  this.arrowPosition = lambdaExpression.arrowPosition;
  
  TypeBinding supertype = findLambdaSuperType(lambdaExpression);
  this.interphase = new String(CharOperation.replaceOnCopy(supertype.genericTypeSignature(), '/', '.'));
  this.elementInfo = makeTypeElementInfo(this, this.interphase, this.sourceStart, this.sourceEnd, this.arrowPosition); 
  this.lambdaMethod = LambdaFactory.createLambdaMethod(this, lambdaExpression);
  this.elementInfo.children = new IJavaElement[] { this.lambdaMethod };
}
org.eclipse.jdt.core.compilerCharOperationreplaceOnCopy

Javadoc

Replace all occurrence of the character to be replaced with the replacement character in a copy of the given array. Returns the given array if no occurrences of the character to be replaced are found.

For example:
  1.  
    array = { 'a' , 'b', 'b', 'a', 'b', 'a' } 
    toBeReplaced = 'b' 
    replacementChar = 'a' 
    result => A new array that is equals to { 'a' , 'a', 'a', 'a', 'a', 'a' } 
    
  2.  
    array = { 'a' , 'b', 'b', 'a', 'b', 'a' } 
    toBeReplaced = 'c' 
    replacementChar = 'a' 
    result => The original array that remains unchanged. 
    

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