From 77e6e5f37add91151e049e89a6b39599624263c2 Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Sun, 13 Sep 2020 19:35:20 +0200 Subject: [PATCH] Add documentation. --- .../main/java/net/bytebuddy/dynamic/DynamicType.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/DynamicType.java b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/DynamicType.java index d81e2db6139..60744480ae5 100644 --- a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/DynamicType.java +++ b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/DynamicType.java @@ -5753,9 +5753,15 @@ protected Builder materialize() { interface Unloaded extends DynamicType { /** + *

* Attempts to load this dynamic type including all of its auxiliary types, if any. If the class loader is an * unsealed instance of {@link InjectionClassLoader}, the classes are injected directy into the class loader, otherwise, * a new class loader is created where the supplied class loader is set as parent. + *

+ *

+ * Note: A new class is attempted to be loaded each time this method is invoked, even if a compatible class was + * created previously. Consider using a {@link net.bytebuddy.TypeCache}. + *

* * @param classLoader The class loader to use for this class loading. * @return This dynamic type in its loaded state. @@ -5763,7 +5769,13 @@ interface Unloaded extends DynamicType { Loaded load(ClassLoader classLoader); /** + *

* Attempts to load this dynamic type including all of its auxiliary types, if any. + *

+ *

+ * Note: A new class is attempted to be loaded each time this method is invoked, even if a compatible class was + * created previously. Consider using a {@link net.bytebuddy.TypeCache}. + *

* * @param classLoader The class loader to use for this class loading. * @param classLoadingStrategy The class loader strategy which should be used for this class loading.