demo | 示例
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
package io.github.linwancen.plugin.show.demo;
|
||||
|
||||
import io.github.linwancen.plugin.show.demo.method.Child;
|
||||
import io.github.linwancen.plugin.show.demo.method.Face;
|
||||
import io.github.linwancen.plugin.show.demo.method.Parent;
|
||||
|
||||
public class Method {
|
||||
public static void method() {
|
||||
Parent noneNewMethod = new Parent();
|
||||
Face noneNewDoc = new Child();
|
||||
|
||||
Child child = new Child(true);
|
||||
Parent parentMethod = child.parentMethod();
|
||||
Face faceMethod = child.faceMethod(child);
|
||||
|
||||
boolean is = child.isBool();
|
||||
Child field = child.field;
|
||||
Child get = child.getField();
|
||||
child.setField(new Child(true)); // field
|
||||
|
||||
Face fun = Child::fun;
|
||||
child
|
||||
.faceMethod(face1 -> Child::fun);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"integer": 0,
|
||||
"str": "",
|
||||
"date": "2022-03-04 21:34:01",
|
||||
"bool": false,
|
||||
"nestedClass": {
|
||||
"nestedClass2": {
|
||||
"a": "a"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package io.github.linwancen.plugin.show.demo.java;
|
||||
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Child;
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Face;
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Parent;
|
||||
|
||||
public class Call extends Parent {
|
||||
public static void call() {
|
||||
Child child = new Child(true);
|
||||
Parent parentMethod = child.parentMethod();
|
||||
Face faceMethod = child.faceMethod(child);
|
||||
boolean is = child.isBool();
|
||||
Child get = child.getField();
|
||||
child.setField(new Child(true)); // field
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.linwancen.plugin.show.demo;
|
||||
package io.github.linwancen.plugin.show.demo.java;
|
||||
|
||||
/**
|
||||
* InDoc
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.github.linwancen.plugin.show.demo;
|
||||
package io.github.linwancen.plugin.show.demo.java;
|
||||
|
||||
import io.github.linwancen.plugin.show.demo.method.Child;
|
||||
import io.github.linwancen.plugin.show.demo.method.Parent;
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Child;
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Parent;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class Loop {
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.linwancen.plugin.show.demo;
|
||||
package io.github.linwancen.plugin.show.demo.java;
|
||||
|
||||
import io.github.linwancen.plugin.show.demo.method.Child;
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Child;
|
||||
|
||||
public class Next {
|
||||
public static void method() {
|
||||
@@ -0,0 +1,23 @@
|
||||
package io.github.linwancen.plugin.show.demo.java;
|
||||
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Child;
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Face;
|
||||
import io.github.linwancen.plugin.show.demo.java.obj.Parent;
|
||||
|
||||
public class Ref implements Face {
|
||||
public static void method() {
|
||||
Parent noneNewMethod = new Call();
|
||||
Face noneNewDoc = new Ref();
|
||||
Child child = new Child(true);
|
||||
Child field = child.field.field;
|
||||
boolean bool = child.field.bool;
|
||||
Face fun = Child::fun;
|
||||
child
|
||||
.faceMethod(face1 -> Child::fun);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Face faceMethod(Face face) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.linwancen.plugin.show.demo.method;
|
||||
package io.github.linwancen.plugin.show.demo.java.obj;
|
||||
|
||||
/** Child */
|
||||
public class Child extends Parent implements Face {
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.linwancen.plugin.show.demo.method;
|
||||
package io.github.linwancen.plugin.show.demo.java.obj;
|
||||
|
||||
/** Face */
|
||||
public interface Face {
|
||||
@@ -0,0 +1,8 @@
|
||||
package io.github.linwancen.plugin.show.demo.java.obj;
|
||||
|
||||
public class NotDoc extends Parent implements Face {
|
||||
@Override
|
||||
public Face faceMethod(Face face) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.linwancen.plugin.show.demo.method;
|
||||
package io.github.linwancen.plugin.show.demo.java.obj;
|
||||
|
||||
/** Parent */
|
||||
public class Parent {
|
||||
@@ -0,0 +1,33 @@
|
||||
package io.github.linwancen.plugin.show.demo.json;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class Pojo {
|
||||
/** integer */
|
||||
private int integer;
|
||||
/** str */
|
||||
private String str;
|
||||
/** date */
|
||||
private Date date;
|
||||
/** bool */
|
||||
private boolean bool;
|
||||
/** nestedClass */
|
||||
private NestedClass nestedClass;
|
||||
/** nestedClassArr */
|
||||
private NestedClass[] nestedClassArr;
|
||||
/** nestedClassList */
|
||||
private List<NestedClass> nestedClassList;
|
||||
|
||||
/** NestedClass */
|
||||
public static class NestedClass{
|
||||
/** nestedClass2 */
|
||||
private NestedClass2 nestedClass2;
|
||||
|
||||
/** NestedClass2 */
|
||||
public static class NestedClass2{
|
||||
/** a */
|
||||
private String a;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"nestedClassArr": [
|
||||
{
|
||||
"nestedClass2": {
|
||||
"a": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"nestedClass2": {
|
||||
"a": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"integer": 0,
|
||||
"str": "",
|
||||
"date": "2022-03-04 21:34:01",
|
||||
"bool": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"nestedClassList": [
|
||||
{
|
||||
"nestedClass2": {
|
||||
"a": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"nestedClass2": {
|
||||
"a": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"nestedClassList": [
|
||||
{
|
||||
"nestedClass2": {
|
||||
"a": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"nestedClass2": {
|
||||
"a": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
io.github.linwancen.plugin.show.demo.java.obj.Child
|
||||
Reference in New Issue
Block a user