1.8 Add line-end-comment for json | 增加从同后缀的类中读取 json 行末注释

This commit is contained in:
林万程
2022-03-06 14:17:13 +08:00
parent 7843ab2421
commit 6882ac7f7b
22 changed files with 371 additions and 137 deletions

View File

@@ -11,20 +11,14 @@ package io.github.linwancen.plugin.show.demo;
* @see InDoc
*/
public class InDoc {
/**
* field
*/
/** field */
public String field;
/**
* method()
*/
/** method() */
public void method1() {
}
/**
* method(InDoc)
*/
/** method(InDoc) */
public void method2(InDoc inDoc) {
}
}

View File

@@ -0,0 +1,11 @@
{
"integer": 0,
"str": "",
"date": "2022-03-04 21:34:01",
"bool": false,
"nestedClass": {
"nestedClass2": {
"a": "a"
}
}
}

View File

@@ -1,16 +1,12 @@
package io.github.linwancen.plugin.show.demo.method;
/**
* Child
*/
/** Child */
public class Child extends Parent implements Face {
public Child() {
}
/**
* Child(boolean bool)
*/
/** Child(boolean bool) */
public Child(boolean bool) {
this.bool = bool;
}
@@ -27,9 +23,7 @@ public class Child extends Parent implements Face {
}
/**
* fun
*/
/** fun */
public static Face fun(Face face) {
return null;
}
@@ -38,9 +32,7 @@ public class Child extends Parent implements Face {
return null;
}
/**
* bool
*/
/** bool */
public boolean bool;
public boolean isBool() {
@@ -48,9 +40,7 @@ public class Child extends Parent implements Face {
}
/**
* field
*/
/** field */
public Child field;
public Child getField() {

View File

@@ -1,12 +1,7 @@
package io.github.linwancen.plugin.show.demo.method;
/**
* Face
*/
//@FunctionalInterface
/** Face */
public interface Face {
/**
* faceMethod
*/
/** faceMethod */
Face faceMethod(Face face);
}

View File

@@ -1,12 +1,8 @@
package io.github.linwancen.plugin.show.demo.method;
/**
* Parent
*/
/** Parent */
public class Parent {
/**
* parentMethod
*/
/** parentMethod */
public Parent parentMethod() {
return null;
}

View File

@@ -0,0 +1,60 @@
package io.github.linwancen.plugin.show.demo.method;
import java.util.Date;
public class Pojo {
/** integer */
private int integer;
/** str */
private String str;
/** date */
private Date date;
/** bool */
private boolean bool;
/** nestedClass */
private NestedClass nestedClass;
/** NestedClass */
public static class NestedClass{
/** nestedClass2 */
private NestedClass2 nestedClass2;
/** NestedClass2 */
public static class NestedClass2{
/** a */
private String a;
}
}
public int getInteger() {
return integer;
}
public void setInteger(int integer) {
this.integer = integer;
}
public String getStr() {
return str;
}
public void setStr(String str) {
this.str = str;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public boolean isBool() {
return bool;
}
public void setBool(boolean bool) {
this.bool = bool;
}
}

View File

@@ -1,4 +1,2 @@
/**
* package doc
*/
/** package doc */
package io.github.linwancen.plugin.show.demo;

View File

@@ -10,7 +10,7 @@ import java.util.function.BiPredicate;
/**
* @see SkipUtils
*/
public class SkipUtilsTest {
class SkipUtilsTest {
public static final boolean o = true;
public static final boolean x = false;
@@ -30,7 +30,7 @@ public class SkipUtilsTest {
};
@Test
public void skipName() {
void skipName() {
// o include, x skip
boolean[][][] results = {{
// "java" -- name
@@ -77,7 +77,7 @@ public class SkipUtilsTest {
}
@Test
public void include() {
void include() {
boolean[][] results = {
// {"java", "io.a", "io.b"} -- name
{o, o, o}, // {},
@@ -89,7 +89,7 @@ public class SkipUtilsTest {
}
@Test
public void exclude() {
void exclude() {
boolean[][] results = {
// {"java", "io.a", "io.b"} ... names
{x, x, x}, // {},