int length = paramTypeNames.length;
char[] tName = CharOperation.concat(declaringTypePackageName,declaringTypeName,'.');
Object cachedType = this.completionEngine.typeCache.get(tName);
IType type = null;
if(cachedType != null) {
if(cachedType != NO_ATTACHED_SOURCE && cachedType instanceof BinaryType) {
type = (BinaryType)cachedType;
}
} else {
// TODO (david) shouldn't it be NameLookup.ACCEPT_ALL ?
NameLookup.Answer answer = this.nameLookup.findType(new String(tName),
false,
NameLookup.ACCEPT_CLASSES & NameLookup.ACCEPT_INTERFACES,
true/* consider secondary types */,
false/* do NOT wait for indexes */,
false/*don't check restrictions*/,
null);
type = answer == null ? null : answer.type;
if(type instanceof BinaryType){
this.completionEngine.typeCache.put(tName, type);
} else {
type = null;
}
}
if(type != null) {
String[] args = new String[length];
for(int i = 0; i< length ; i++){
args[i] = new String(paramTypeNames[i]);
}
IMethod method = type.getMethod(new String(selector),args);
try{
parameterNames = new char[length][];
String[] params = method.getParameterNames();
for(int i = 0; i< length ; i++){
parameterNames[i] = params[i].toCharArray();