11/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
22 *
3- * Copyright © 2025 microBean™.
3+ * Copyright © 2025–2026 microBean™.
44 *
55 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66 * the License. You may obtain a copy of the License at
4242
4343import static java .lang .invoke .MethodType .methodType ;
4444
45+ import static java .util .Objects .requireNonNull ;
46+
4547/**
4648 * An {@link AbstractToolkitProxier} and {@link ClientProxier} that uses <a href="https://bytebuddy.net/#/">Byte
4749 * Buddy</a> to {@linkplain #generate(ProxySpecification) generate} {@linkplain org.microbean.proxy.Proxy client
5456public final class BBClientProxier extends AbstractToolkitProxier <ProxySpecification , DynamicType .Unloaded <?>> implements ClientProxier {
5557
5658 private static final Map <ProxySpecification , Object > clientProxyInstances = new ConcurrentHashMap <>();
57-
59+
5860 private final TypeDefinitions tds ;
5961
6062 private final BBClientProxyClassGenerator g ;
6163
6264 /**
6365 * Creates a new {@link BBClientProxier}.
6466 *
65- * @param domain a {@link Domain}; must not be {@code null }
67+ * @param domain a non-{@code null} {@link Domain }
6668 *
6769 * @exception NullPointerException if any argument is {@code null}
6870 *
@@ -77,9 +79,9 @@ public BBClientProxier(final Domain domain) {
7779 /**
7880 * Creates a new {@link BBClientProxier}.
7981 *
80- * @param domain a {@link Domain}; must not be {@code null }
82+ * @param domain a non-{@code null} {@link Domain }
8183 *
82- * @param typePool a {@link TypePool}; must not be {@code null }
84+ * @param typePool a non-{@code null} {@link TypePool }
8385 *
8486 * @exception NullPointerException if any argument is {@code null}
8587 *
@@ -97,27 +99,27 @@ public BBClientProxier(final Domain domain,
9799 /**
98100 * Creates a new {@link BBClientProxier}.
99101 *
100- * @param domain a {@link Domain}; must not be {@code null}
102+ * @param domain a non-{@code null} {@link Domain}; must not be {@code null}
101103 *
102- * @param tds a {@link TypeDefinitions}; must not be {@code null }
104+ * @param tds a non-{@code null} {@link TypeDefinitions }
103105 *
104- * @param g a {@link BBClientProxyClassGenerator}; must not be {@code null }
106+ * @param g a non-{@code nulll} {@link BBClientProxyClassGenerator }
105107 *
106108 * @exception NullPointerException if any argument is {@code null}
107109 */
108110 public BBClientProxier (final Domain domain ,
109- final TypeDefinitions tds ,
110- final BBClientProxyClassGenerator g ) {
111+ final TypeDefinitions tds ,
112+ final BBClientProxyClassGenerator g ) {
111113 super (domain , MethodHandles .lookup ());
112- this .tds = Objects . requireNonNull (tds , "tds" );
113- this .g = Objects . requireNonNull (g , "g" );
114+ this .tds = requireNonNull (tds , "tds" );
115+ this .g = requireNonNull (g , "g" );
114116 }
115117
116118 @ Override // ClientProxier
117119 public <R > R clientProxy (final Id id , final Supplier <? extends R > instanceSupplier ) {
118120 return this .proxy (new ProxySpecification (this .domain (), id ), instanceSupplier ).$cast ();
119121 }
120-
122+
121123 @ Override // AbstractClientProxier<DynamicType.Unloaded<?>>
122124 protected final DynamicType .Unloaded <?> generate (final ProxySpecification ps ) {
123125 return
@@ -145,7 +147,6 @@ public final <R> Proxy<R> proxy(final ProxySpecification ps, final Supplier<? ex
145147 });
146148 }
147149
148-
149150 @ Override // AbstractClientProxier<DynamicType.Unloaded<?>>
150151 protected final Class <?> proxyClass (final DynamicType .Unloaded <?> dtu , final ClassLoader cl )
151152 throws ClassNotFoundException {
0 commit comments