Smart Method doc for Ref | 方法引用智能注释

This commit is contained in:
林万程
2022-03-15 00:48:40 +08:00
parent ada9d9c25e
commit 33c324c1d5
3 changed files with 8 additions and 4 deletions

View File

@@ -22,6 +22,9 @@ class SkipDocUtils {
if (skip(docOwner)) { if (skip(docOwner)) {
return null; return null;
} }
if (docOwner instanceof PsiMethod) {
return DocUtils.methodDoc(((PsiMethod) docOwner));
}
return DocUtils.srcOrByteCodeDoc(docOwner); return DocUtils.srcOrByteCodeDoc(docOwner);
} }

View File

@@ -11,9 +11,9 @@ public class Ref implements Face {
Child child = new Child(true); Child child = new Child(true);
Child field = child.field.field; Child field = child.field.field;
boolean bool = child.field.bool; boolean bool = child.field.bool;
Face fun = Child::fun; Face fun = Child::setFun;
child child
.faceMethod(face1 -> Child::fun); .faceMethod(face1 -> Child::setFun);
} }
@Override @Override

View File

@@ -22,9 +22,10 @@ public class Child extends Parent implements Face {
return null; return null;
} }
/** String fun */
public String fun;
/** fun */ public static Face setFun(Face face) {
public static Face fun(Face face) {
return null; return null;
} }