想请问一下,以下这段是使用JD-GUI解译出来的其中一段程式码,
private List<ContentEntityObject> findBlogPosts(SearchResults searchResults) {
Lists.newArrayList(Collections2.transform(
his.searchManager.convertToEntities(searchResults,
SearchManager.EntityVersionPolicy.LATEST_VERSION), new Function() {
public ContentEntityObject apply(Searchable searchable) {
return (ContentEntityObject) searchable;
}
}));
}
但是放到Eclipse里会有些部分有红线如下:
findBlogPosts(SearchResults searchResults)
2 quick fixes available:
Add return statement => 变成 return Lists.newArrayList(Collections2...
Change return type to 'void'
new Function() {
1 quick fix available:
Add unimplemented methods => 变成增加如下片段:
@Override
public Object apply(Object input) {
return null;
}
不确定是不是解译有错,Java有method里面还可以new Function() {....}这种语法吗
这是Lambda?