use of meghanada.reflect.names.MethodParameterNames in project meghanada-server by mopemope.
the class MethodAnalyzeVisitor method tryGetParameterName.
private boolean tryGetParameterName(final String className, final String name) {
// log.debug("search {}", name);
final String path = ClassNameUtils.replace(className, ".", "/");
try (final InputStream in = getClass().getResourceAsStream("/params/" + path + ".param")) {
if (in == null) {
return false;
}
final MethodParameterNames mn = Serializer.readObject(in, MethodParameterNames.class);
final List<List<ParameterName>> pmsList = mn.names.get(name);
if (pmsList == null) {
return false;
}
final boolean result = this.searchParameterNames(pmsList);
if (result) {
return true;
}
// fallback
return false;
} catch (Exception e) {
log.debug(e.getMessage());
}
return false;
}
Aggregations