IMethod createBinaryMethodHandle(IType type, char[] methodSelector, char[][] argumentTypeNames) { ClassFileReader reader = MatchLocator.classFileReader(type); if (reader != null) { IBinaryMethod[] methods = reader.getMethods(); if (methods != null) { int argCount = argumentTypeNames == null ? 0 : argumentTypeNames.length; nextMethod : for (int i = 0, methodsLength = methods.length; i < methodsLength; i++) { IBinaryMethod binaryMethod = methods[i]; char[] selector = binaryMethod.isConstructor() ? type.getElementName().toCharArray() : binaryMethod.getSelector(); if (CharOperation.equals(selector, methodSelector)) { char[] signature = binaryMethod.getGenericSignature(); if (signature == null) signature = binaryMethod.getMethodDescriptor(); char[][] parameterTypes = Signature.getParameterTypes(signature); if (argCount != parameterTypes.length) continue nextMethod; if (argumentTypeNames != null) { for (int j = 0; j < argCount; j++) { char[] parameterTypeName = ClassFileMatchLocator.convertClassFileFormat(parameterTypes[j]); if (!CharOperation.endsWith(Signature.toCharArray(Signature.getTypeErasure(parameterTypeName)), CharOperation.replaceOnCopy(argumentTypeNames[j], '$', '.'))) continue nextMethod; parameterTypes[j] = parameterTypeName; } } return (IMethod) createMethodHandle(type, new String(selector), CharOperation.toStrings(parameterTypes)); } } } } return null; } /*
IMethod createBinaryMethodHandle(IType type, char[] methodSelector, char[][] argumentTypeNames) { IBinaryType reader = MatchLocator.classFileReader(type); if (reader != null) { IBinaryMethod[] methods = reader.getMethods(); if (methods != null) { int argCount = argumentTypeNames == null ? 0 : argumentTypeNames.length; nextMethod : for (int i = 0, methodsLength = methods.length; i < methodsLength; i++) { IBinaryMethod binaryMethod = methods[i]; char[] selector = binaryMethod.isConstructor() ? type.getElementName().toCharArray() : binaryMethod.getSelector(); if (CharOperation.equals(selector, methodSelector)) { char[] signature = binaryMethod.getGenericSignature(); if (signature == null) signature = binaryMethod.getMethodDescriptor(); char[][] parameterTypes = Signature.getParameterTypes(signature); if (argCount != parameterTypes.length) continue nextMethod; if (argumentTypeNames != null) { for (int j = 0; j < argCount; j++) { char[] parameterTypeName = ClassFileMatchLocator.convertClassFileFormat(parameterTypes[j]); if (!CharOperation.endsWith(Signature.toCharArray(Signature.getTypeErasure(parameterTypeName)), CharOperation.replaceOnCopy(argumentTypeNames[j], '$', '.'))) continue nextMethod; parameterTypes[j] = parameterTypeName; } } return (IMethod) createMethodHandle(type, new String(selector), CharOperation.toStrings(parameterTypes)); } } } } return null; } /*
IMethod createBinaryMethodHandle(IType type, char[] methodSelector, char[][] argumentTypeNames) { IBinaryType reader = MatchLocator.classFileReader(type); if (reader != null) { IBinaryMethod[] methods = reader.getMethods(); if (methods != null) { int argCount = argumentTypeNames == null ? 0 : argumentTypeNames.length; nextMethod : for (int i = 0, methodsLength = methods.length; i < methodsLength; i++) { IBinaryMethod binaryMethod = methods[i]; char[] selector = binaryMethod.isConstructor() ? type.getElementName().toCharArray() : binaryMethod.getSelector(); if (CharOperation.equals(selector, methodSelector)) { char[] signature = binaryMethod.getGenericSignature(); if (signature == null) signature = binaryMethod.getMethodDescriptor(); char[][] parameterTypes = Signature.getParameterTypes(signature); if (argCount != parameterTypes.length) continue nextMethod; if (argumentTypeNames != null) { for (int j = 0; j < argCount; j++) { char[] parameterTypeName = ClassFileMatchLocator.convertClassFileFormat(parameterTypes[j]); if (!CharOperation.endsWith(Signature.toCharArray(Signature.getTypeErasure(parameterTypeName)), CharOperation.replaceOnCopy(argumentTypeNames[j], '$', '.'))) continue nextMethod; parameterTypes[j] = parameterTypeName; } } return (IMethod) createMethodHandle(type, new String(selector), CharOperation.toStrings(parameterTypes)); } } } } return null; } /*
IMethod createBinaryMethodHandle(IType type, char[] methodSelector, char[][] argumentTypeNames) { ClassFileReader reader = MatchLocator.classFileReader(type); if (reader != null) { IBinaryMethod[] methods = reader.getMethods(); if (methods != null) { int argCount = argumentTypeNames == null ? 0 : argumentTypeNames.length; nextMethod : for (int i = 0, methodsLength = methods.length; i < methodsLength; i++) { IBinaryMethod binaryMethod = methods[i]; char[] selector = binaryMethod.isConstructor() ? type.getElementName().toCharArray() : binaryMethod.getSelector(); if (CharOperation.equals(selector, methodSelector)) { char[] signature = binaryMethod.getGenericSignature(); if (signature == null) signature = binaryMethod.getMethodDescriptor(); char[][] parameterTypes = Signature.getParameterTypes(signature); if (argCount != parameterTypes.length) continue nextMethod; if (argumentTypeNames != null) { for (int j = 0; j < argCount; j++) { char[] parameterTypeName = ClassFileMatchLocator.convertClassFileFormat(parameterTypes[j]); if (!CharOperation.endsWith(Signature.toCharArray(Signature.getTypeErasure(parameterTypeName)), CharOperation.replaceOnCopy(argumentTypeNames[j], '$', '.'))) continue nextMethod; parameterTypes[j] = parameterTypeName; } } return (IMethod) createMethodHandle(type, new String(selector), CharOperation.toStrings(parameterTypes)); } } } } return null; } /*
IMethod createBinaryMethodHandle(IType type, char[] methodSelector, char[][] argumentTypeNames) { ClassFileReader reader = MatchLocator.classFileReader(type); if (reader != null) { IBinaryMethod[] methods = reader.getMethods(); if (methods != null) { int argCount = argumentTypeNames == null ? 0 : argumentTypeNames.length; nextMethod : for (int i = 0, methodsLength = methods.length; i < methodsLength; i++) { IBinaryMethod binaryMethod = methods[i]; char[] selector = binaryMethod.isConstructor() ? type.getElementName().toCharArray() : binaryMethod.getSelector(); if (CharOperation.equals(selector, methodSelector)) { char[] signature = binaryMethod.getGenericSignature(); if (signature == null) signature = binaryMethod.getMethodDescriptor(); char[][] parameterTypes = Signature.getParameterTypes(signature); if (argCount != parameterTypes.length) continue nextMethod; if (argumentTypeNames != null) { for (int j = 0; j < argCount; j++) { char[] parameterTypeName = ClassFileMatchLocator.convertClassFileFormat(parameterTypes[j]); if (!CharOperation.endsWith(Signature.toCharArray(Signature.getTypeErasure(parameterTypeName)), CharOperation.replaceOnCopy(argumentTypeNames[j], '$', '.'))) continue nextMethod; parameterTypes[j] = parameterTypeName; } } return (IMethod) createMethodHandle(type, new String(selector), CharOperation.toStrings(parameterTypes)); } } } } return null; } /*
IMethod createBinaryMethodHandle(IType type, char[] methodSelector, char[][] argumentTypeNames) { ClassFileReader reader = MatchLocator.classFileReader(type); if (reader != null) { IBinaryMethod[] methods = reader.getMethods(); if (methods != null) { int argCount = argumentTypeNames == null ? 0 : argumentTypeNames.length; nextMethod : for (int i = 0, methodsLength = methods.length; i < methodsLength; i++) { IBinaryMethod binaryMethod = methods[i]; char[] selector = binaryMethod.isConstructor() ? type.getElementName().toCharArray() : binaryMethod.getSelector(); if (CharOperation.equals(selector, methodSelector)) { char[] signature = binaryMethod.getGenericSignature(); if (signature == null) signature = binaryMethod.getMethodDescriptor(); char[][] parameterTypes = Signature.getParameterTypes(signature); if (argCount != parameterTypes.length) continue nextMethod; if (argumentTypeNames != null) { for (int j = 0; j < argCount; j++) { char[] parameterTypeName = ClassFileMatchLocator.convertClassFileFormat(parameterTypes[j]); if (!CharOperation.endsWith(Signature.toCharArray(Signature.getTypeErasure(parameterTypeName)), CharOperation.replaceOnCopy(argumentTypeNames[j], '$', '.'))) continue nextMethod; parameterTypes[j] = parameterTypeName; } } return (IMethod) createMethodHandle(type, new String(selector), CharOperation.toStrings(parameterTypes)); } } } } return null; } /*
return createMethodHandle(type, new String(method.selector), parameterTypeSignatures);
return createMethodHandle(type, new String(method.selector), parameterTypeSignatures);
return createMethodHandle(type, new String(method.selector), parameterTypeSignatures);
return createMethodHandle(type, new String(method.selector), parameterTypeSignatures);
return createMethodHandle(type, new String(method.selector), parameterTypeSignatures);
return createMethodHandle(type, new String(method.selector), parameterTypeSignatures);