diff --git a/README.md b/README.md index 71366dd..2cbf484 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ public class Demo { //////////////////////////////////////// System.out.println("Is executor lazy? " + - containsInstanceOnWrapperChain(executor, LazyExecutorWrapper.class)); + containsInstanceTypeOnWrapperChain(executor, LazyExecutorWrapper.class)); // print true String busy = getAttachmentFromWrapperChain(executor, "busy"); @@ -208,7 +208,7 @@ public class IntegrationDemo { //////////////////////////////////////// System.out.println("Is executor ExistedExecutorWrapper? " + - containsInstanceOnWrapperChain(executor, ExistedExecutorWrapper.class)); + containsInstanceTypeOnWrapperChain(executor, ExistedExecutorWrapper.class)); // print true String adaptAttachment = getAttachmentFromWrapperChain(executor, "adapted-existed-executor-wrapper-msg"); System.out.println("Adapted existed executor wrapper msg: " + adaptAttachment); @@ -305,7 +305,7 @@ public class IntegrationDemoUsingWrapperAdapterUtils { //////////////////////////////////////// System.out.println("Is executor ExistedExecutorWrapper? " + - containsInstanceOnWrapperChain(executor, ExistedExecutorWrapper.class)); + containsInstanceTypeOnWrapperChain(executor, ExistedExecutorWrapper.class)); // print true String adaptAttachment = getAttachmentFromWrapperChain(executor, "adapted-existed-executor-wrapper-msg"); System.out.println("Adapted existed executor wrapper msg: " + adaptAttachment); diff --git a/src/main/java/io/foldright/inspectablewrappers/Inspector.java b/src/main/java/io/foldright/inspectablewrappers/Inspector.java index d15846e..750df61 100644 --- a/src/main/java/io/foldright/inspectablewrappers/Inspector.java +++ b/src/main/java/io/foldright/inspectablewrappers/Inspector.java @@ -3,9 +3,13 @@ import edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; +import org.jetbrains.annotations.Contract; +import java.util.ArrayList; import java.util.IdentityHashMap; +import java.util.List; import java.util.Optional; +import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; @@ -19,7 +23,7 @@ *

Common simple usages

*