Class CharDeduplication

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.util.CharDeduplication

public class CharDeduplication extends Object
  • Field Details

    • TABLE_SIZE

      public static final int TABLE_SIZE
      See Also:
      Constant Field Values
    • INTERNAL_TABLE_SIZE

      public static final int INTERNAL_TABLE_SIZE
      See Also:
      Constant Field Values
    • OPTIMIZED_LENGTH

      public static final int OPTIMIZED_LENGTH
      See Also:
      Constant Field Values
    • charArray_length

      public final char[][][][] charArray_length
      single threaded only
  • Method Details

    • getThreadLocalInstance

      public static CharDeduplication getThreadLocalInstance()
      Returns:
      an instance that is *not* thread safe. To be used in a single thread only.
    • reset

      @Deprecated public void reset()
      Deprecated.
      public for test purpose only
    • sharedCopyOfRange

      public char[] sharedCopyOfRange(char[] source, int from, int to)
      like Arrays.copyOfRange(source, from, to) but returns a cached instance of the former result if available
      Parameters:
      from - start index (inclusive)
      to - end index (exclusive)
      Returns:
      source[from..to-1]
      See Also:
      Arrays.copyOfRange(char[], int, int)