Example usage for org.eclipse.jdt.core.compiler CharOperation remove

List of usage examples for org.eclipse.jdt.core.compiler CharOperation remove

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.compiler CharOperation remove.

Prototype

public static final char[] remove(char[] array, char toBeRemoved) 

Source Link

Document

Answers a new array removing a given character.

Usage

From source file:com.ibm.research.tours.content.url.Signature.java

License:Open Source License

/**
 * Removes any capture information from the given type or method signature
 * and returns the resulting signature./*  w w  w . j a v a 2 s  .co m*/
 * Returns the type or method signature itself if no capture information is
 * present.
 * <p>
 * For example (using equivalent string-based method):
 * <pre>
 * <code>
 * removeCapture("LTest&lt;!+Ljava.lang.Throwable;&gt;;")
 * will return: "LTest&lt;+Ljava.lang.Throwable;&gt;;"
 * </code>
 * </pre>
 * </p>
 *
 * @param methodOrTypeSignature the signature which may have been captured
 * @return a new signature without capture information or the signature itself
 *    if no specific capture information is present
 * @exception NullPointerException if <code>methodOrTypeSignature</code> is null
 *
 * @since 3.1
 */
public static char[] removeCapture(char[] methodOrTypeSignature) {
    return CharOperation.remove(methodOrTypeSignature, C_CAPTURE);
}