Skip to content

Commit

Permalink
Extend javadoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Mar 28, 2020
1 parent fd579fa commit 6f5ff83
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,10 @@ public static ClassLoadingStrategy<ClassLoader> of(Object lookup) {
/**
* Resolves a class loading strategy using a lookup if available on the current JVM. If the current JVM supports method handles
* lookups, a lookup instance will be used. Alternatively, unsafe class definition is used, if supported. If neither strategy is
* supported, an exception is thrown.
* supported, an exception is thrown. A common use case would be calling this method as in
* {@code ClassLoadingStrategy.UsingLookup.withFallback(MethodHandles::lookup)}. Note that the invocation of
* {@code MethodHandles.lookup()} is call site sensitive such that it cannot be invoked within Byte Buddy what requires this
* external invocation.
*
* @param lookup A resolver for a lookup instance if the current JVM allows for lookup-based class injection.
* @return An appropriate class loading strategy for the current JVM that uses a method handles lookup if available.
Expand Down

0 comments on commit 6f5ff83

Please sign in to comment.