From 7855d2f7715d9a747a72455b006df6cbf07d9eff Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Wed, 6 Jan 2021 20:54:51 +0200 Subject: [PATCH] Add more javadoc for exposed test classes --- pf4j/src/test/java/org/pf4j/test/AnotherFailTestPlugin.java | 3 +++ pf4j/src/test/java/org/pf4j/test/FailTestExtension.java | 3 +++ pf4j/src/test/java/org/pf4j/test/FailTestPlugin.java | 3 +++ pf4j/src/test/java/org/pf4j/test/TestExtension.java | 2 ++ pf4j/src/test/java/org/pf4j/test/TestExtensionPoint.java | 2 ++ pf4j/src/test/java/org/pf4j/test/TestPlugin.java | 5 +++++ pf4j/src/test/java/org/pf4j/test/package-info.java | 6 ++++++ 7 files changed, 24 insertions(+) create mode 100644 pf4j/src/test/java/org/pf4j/test/package-info.java diff --git a/pf4j/src/test/java/org/pf4j/test/AnotherFailTestPlugin.java b/pf4j/src/test/java/org/pf4j/test/AnotherFailTestPlugin.java index a32a682..d97b32c 100644 --- a/pf4j/src/test/java/org/pf4j/test/AnotherFailTestPlugin.java +++ b/pf4j/src/test/java/org/pf4j/test/AnotherFailTestPlugin.java @@ -18,6 +18,9 @@ package org.pf4j.test; import org.pf4j.Plugin; /** + * A wrong {@link org.pf4j.Plugin}. + * It's wrong because it doesn't contain a constructor with one parameter ({@link org.pf4j.PluginWrapper} as parameter type). + * * @author Mario Franco */ public class AnotherFailTestPlugin extends Plugin { diff --git a/pf4j/src/test/java/org/pf4j/test/FailTestExtension.java b/pf4j/src/test/java/org/pf4j/test/FailTestExtension.java index 511da42..1ce2aa8 100644 --- a/pf4j/src/test/java/org/pf4j/test/FailTestExtension.java +++ b/pf4j/src/test/java/org/pf4j/test/FailTestExtension.java @@ -18,6 +18,9 @@ package org.pf4j.test; import org.pf4j.Extension; /** + * A wrong {@link org.pf4j.Extension}. + * It's wrong because it doesn't contain a constructor with empty parameters (or only the default constructor). + * * @author Mario Franco */ @Extension diff --git a/pf4j/src/test/java/org/pf4j/test/FailTestPlugin.java b/pf4j/src/test/java/org/pf4j/test/FailTestPlugin.java index 7545f6c..3a1824f 100644 --- a/pf4j/src/test/java/org/pf4j/test/FailTestPlugin.java +++ b/pf4j/src/test/java/org/pf4j/test/FailTestPlugin.java @@ -16,6 +16,9 @@ package org.pf4j.test; /** + * A wrong {@link org.pf4j.Plugin}. + * It's wrong because it doesn't extends {@link org.pf4j.Plugin}. + * * @author Mario Franco */ public class FailTestPlugin { diff --git a/pf4j/src/test/java/org/pf4j/test/TestExtension.java b/pf4j/src/test/java/org/pf4j/test/TestExtension.java index 45c6282..ec67b14 100644 --- a/pf4j/src/test/java/org/pf4j/test/TestExtension.java +++ b/pf4j/src/test/java/org/pf4j/test/TestExtension.java @@ -18,6 +18,8 @@ package org.pf4j.test; import org.pf4j.Extension; /** + * A simple {@link Extension}. It implements {@link TestExtensionPoint}. + * * @author Mario Franco */ @Extension diff --git a/pf4j/src/test/java/org/pf4j/test/TestExtensionPoint.java b/pf4j/src/test/java/org/pf4j/test/TestExtensionPoint.java index 3a282c7..3849c92 100644 --- a/pf4j/src/test/java/org/pf4j/test/TestExtensionPoint.java +++ b/pf4j/src/test/java/org/pf4j/test/TestExtensionPoint.java @@ -18,6 +18,8 @@ package org.pf4j.test; import org.pf4j.ExtensionPoint; /** + * A simple {@link ExtensionPoint} that contains one method ({@link #saySomething()}). + * * @author Mario Franco */ public interface TestExtensionPoint extends ExtensionPoint { diff --git a/pf4j/src/test/java/org/pf4j/test/TestPlugin.java b/pf4j/src/test/java/org/pf4j/test/TestPlugin.java index 46cc5c0..bab85b3 100644 --- a/pf4j/src/test/java/org/pf4j/test/TestPlugin.java +++ b/pf4j/src/test/java/org/pf4j/test/TestPlugin.java @@ -19,6 +19,11 @@ import org.pf4j.Plugin; import org.pf4j.PluginWrapper; /** + * A simple {@link Plugin}. + * + * In real applications you don't need to create a plugin like this if you are not interested in lifecycle events. + * {@codes PF4J} will automatically create a plugin similar to this (empty / dummy) if no class plugin is specified. + * * @author Mario Franco */ public class TestPlugin extends Plugin { diff --git a/pf4j/src/test/java/org/pf4j/test/package-info.java b/pf4j/src/test/java/org/pf4j/test/package-info.java new file mode 100644 index 0000000..bdd5723 --- /dev/null +++ b/pf4j/src/test/java/org/pf4j/test/package-info.java @@ -0,0 +1,6 @@ +/** + * Classes used to test different aspects of PF4J (plugins, extensions points, extensions). + * + * @author Decebal Suiu + */ +package org.pf4j.test; -- 2.39.5