Bug 12762

Summary: Performance - Signature#createTypeSignature should be implemented in term of char[]
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2002-04-04 04:17:05 EST
Build 20020328

The String based createTypeSignature method should be implemented in term of 
the char[] one, and not the opposite, since it is dealing with char[] 
underneath anyway.
Comment 1 Olivier Thomann CLA 2002-04-10 10:14:44 EDT
I would say we should define methods that use char[] for the following at least:

static char[] arrayIfy(char[], int)
public static int getArrayCount(char[]) throws IllegalArgumentException
public static int getParameterCount(char[]) throws IllegalArgumentException
public static char[][] getParameterTypes(char[]) throws IllegalArgumentException
public static char[] getReturnType(char[]) throws IllegalArgumentException
public static char[] toString(char[],char[],char[][],boolean, boolean)
public static char[] toString(char[]) throws IllegalArgumentException

For the first one, I wonder what the name means. I definitely need APIs that 
create as less new char[] as possible.
Comment 2 Olivier Thomann CLA 2002-04-10 11:39:08 EDT
It is important that no cache is used to perform these operations. They should use the minimal 
amount of memory.
Comment 3 Jerome Lanneluc CLA 2002-04-11 09:37:59 EDT
All methods now have their counterpart that use char arrays.
These methods don't create needless extra objects.