Skip to content

Commit 02f56c6

Browse files
authored
Road grading; refreshes dependencies (#3)
Signed-off-by: Laird Nelson <ljnelson@gmail.com>
1 parent 94bf7c6 commit 02f56c6

5 files changed

Lines changed: 143 additions & 127 deletions

File tree

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# microBean™ Client Proxy: Byte Buddy
22

33
[![Maven
4-
Central](https://img.shields.io/maven-central/v/org.microbean/microbean-clientproxy-bytebuddy.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.microbean/microbean-clientproxy-bytebuddy)
4+
Central](https://img.shields.io/maven-central/v/org.microbean/microbean-clientproxy-bytebuddy.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/org.microbean/microbean-clientproxy-bytebuddy)
5+
6+
![0% AI](https://img.shields.io/badge/%F0%9F%A4%96_AI-0%25_%F0%9F%8C%BC-brightgreen)
57

68
The microBean™ Client Proxy: Byte Buddy project provides classes and interfaces assisting with implementing <a
79
href="https://microbean.github.io/microbean-reference/apidocs/org.microbean.reference/org/microbean/reference/ClientProxy.html"><dfn>client
@@ -22,15 +24,16 @@ microBean™ Client Proxy: Byte Buddy requires a Java runtime of version 19 or h
2224

2325
# Installation
2426

25-
microBean™ Client Proxy: Byte Buddy is available on [Maven Central](https://search.maven.org/). Include microBean™
26-
Client Proxy: Byte Buddy as a Maven dependency:
27+
microBean™ Client Proxy: Byte Buddy is available on [Maven
28+
Central](https://central.sonatype.com/artifact/org.microbean/microbean-clientproxy-bytebuddy). Include microBean™ Client
29+
Proxy: Byte Buddy as a Maven dependency:
2730

2831
```xml
2932
<dependency>
3033
<groupId>org.microbean</groupId>
3134
<artifactId>microbean-clientproxy-bytebuddy</artifactId>
32-
<!-- Always check https://search.maven.org/artifact/org.microbean/microbean-clientproxy-bytebuddy for up-to-date available versions. -->
33-
<version>0.0.2</version>
35+
<!-- Always check https://central.sonatype.com/artifact/org.microbean/microbean-clientproxy-bytebuddy for up-to-date available versions. -->
36+
<version>0.0.3</version>
3437
</dependency>
3538
```
3639

pom.xml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,49 +130,49 @@
130130
<dependency>
131131
<groupId>net.bytebuddy</groupId>
132132
<artifactId>byte-buddy</artifactId>
133-
<version>1.18.3</version>
133+
<version>1.18.5</version>
134134
</dependency>
135135

136136
<dependency>
137137
<groupId>org.microbean</groupId>
138138
<artifactId>microbean-assign</artifactId>
139-
<version>0.0.11</version>
139+
<version>0.0.14</version>
140140
</dependency>
141141

142142
<dependency>
143143
<groupId>org.microbean</groupId>
144144
<artifactId>microbean-bean</artifactId>
145-
<version>0.0.22</version>
145+
<version>0.0.23</version>
146146
</dependency>
147147

148148
<dependency>
149149
<groupId>org.microbean</groupId>
150150
<artifactId>microbean-construct</artifactId>
151-
<version>0.0.18</version>
151+
<version>0.0.24</version>
152152
</dependency>
153153

154154
<dependency>
155155
<groupId>org.microbean</groupId>
156156
<artifactId>microbean-producer</artifactId>
157-
<version>0.0.3</version>
157+
<version>0.0.4</version>
158158
</dependency>
159159

160160
<dependency>
161161
<groupId>org.microbean</groupId>
162162
<artifactId>microbean-proxy</artifactId>
163-
<version>0.0.5</version>
163+
<version>0.0.6</version>
164164
</dependency>
165165

166166
<dependency>
167167
<groupId>org.microbean</groupId>
168168
<artifactId>microbean-reference</artifactId>
169-
<version>0.0.5</version>
169+
<version>0.0.6</version>
170170
</dependency>
171171

172172
<dependency>
173173
<groupId>org.microbean</groupId>
174174
<artifactId>microbean-scopelet</artifactId>
175-
<version>0.0.11</version>
175+
<version>0.0.12</version>
176176
</dependency>
177177

178178
</dependencies>
@@ -363,7 +363,7 @@
363363
<dependency>
364364
<groupId>com.puppycrawl.tools</groupId>
365365
<artifactId>checkstyle</artifactId>
366-
<version>12.3.0</version>
366+
<version>13.2.0</version>
367367
</dependency>
368368
</dependencies>
369369
</plugin>
@@ -384,7 +384,7 @@
384384
</plugin>
385385
<plugin>
386386
<artifactId>maven-compiler-plugin</artifactId>
387-
<version>3.14.1</version>
387+
<version>3.15.0</version>
388388
<configuration>
389389
<compilerArgs>
390390
<arg>-Xlint:all</arg>
@@ -394,7 +394,7 @@
394394
</plugin>
395395
<plugin>
396396
<artifactId>maven-dependency-plugin</artifactId>
397-
<version>3.9.0</version>
397+
<version>3.10.0</version>
398398
</plugin>
399399
<plugin>
400400
<artifactId>maven-deploy-plugin</artifactId>
@@ -484,9 +484,6 @@
484484
<plugin>
485485
<artifactId>maven-surefire-plugin</artifactId>
486486
<version>3.5.4</version>
487-
<configuration>
488-
<argLine>-XX:StartFlightRecording=duration=10s,filename=${project.build.directory}/recording.jfr</argLine>
489-
</configuration>
490487
</plugin>
491488
<plugin>
492489
<artifactId>maven-toolchains-plugin</artifactId>
@@ -500,7 +497,7 @@
500497
<plugin>
501498
<groupId>org.codehaus.mojo</groupId>
502499
<artifactId>versions-maven-plugin</artifactId>
503-
<version>2.20.1</version>
500+
<version>2.21.0</version>
504501
</plugin>
505502
<plugin>
506503
<groupId>io.smallrye</groupId>
@@ -510,7 +507,7 @@
510507
<plugin>
511508
<groupId>org.sonatype.central</groupId>
512509
<artifactId>central-publishing-maven-plugin</artifactId>
513-
<version>0.9.0</version>
510+
<version>0.10.0</version>
514511
<extensions>true</extensions>
515512
<configuration>
516513
<publishingServerId>central.sonatype.com</publishingServerId>

src/main/java/org/microbean/clientproxy/bytebuddy/BBClientProxier.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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
@@ -42,6 +42,8 @@
4242

4343
import 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
@@ -54,15 +56,15 @@
5456
public 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 {

src/main/java/org/microbean/clientproxy/bytebuddy/BBClientProxyClassGenerator.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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
@@ -35,7 +35,6 @@
3535
import net.bytebuddy.implementation.HashCodeMethod;
3636
import net.bytebuddy.implementation.EqualsMethod;
3737
import net.bytebuddy.implementation.FieldAccessor;
38-
import net.bytebuddy.implementation.MethodCall;
3938

4039
import net.bytebuddy.implementation.bytecode.assign.Assigner;
4140

@@ -45,34 +44,28 @@
4544

4645
import static java.util.Objects.requireNonNull;
4746

48-
import static net.bytebuddy.description.modifier.Ownership.STATIC;
4947
import static net.bytebuddy.description.modifier.SyntheticState.SYNTHETIC;
5048
import static net.bytebuddy.description.modifier.Visibility.PRIVATE;
5149
import static net.bytebuddy.description.modifier.Visibility.PUBLIC;
5250

5351
import static net.bytebuddy.description.type.TypeDescription.Generic.Builder.parameterizedType;
54-
import static net.bytebuddy.description.type.TypeDescription.Generic.Builder.typeVariable;
5552

5653
import static net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy.Default.NO_CONSTRUCTORS;
5754

5855
import static net.bytebuddy.implementation.MethodCall.invoke;
5956
import static net.bytebuddy.implementation.MethodCall.invokeSelf;
6057

6158
import static net.bytebuddy.matcher.ElementMatchers.any;
62-
import static net.bytebuddy.matcher.ElementMatchers.hasParameters;
6359
import static net.bytebuddy.matcher.ElementMatchers.isConstructor;
6460
import static net.bytebuddy.matcher.ElementMatchers.isDeclaredBy;
6561
import static net.bytebuddy.matcher.ElementMatchers.isEquals;
6662
import static net.bytebuddy.matcher.ElementMatchers.isFinal;
6763
import static net.bytebuddy.matcher.ElementMatchers.isHashCode;
6864
import static net.bytebuddy.matcher.ElementMatchers.isPackagePrivate;
69-
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
7065
import static net.bytebuddy.matcher.ElementMatchers.isToString;
7166
import static net.bytebuddy.matcher.ElementMatchers.isVirtual;
72-
import static net.bytebuddy.matcher.ElementMatchers.nameStartsWith;
7367
import static net.bytebuddy.matcher.ElementMatchers.named;
7468
import static net.bytebuddy.matcher.ElementMatchers.not;
75-
import static net.bytebuddy.matcher.ElementMatchers.returns;
7669
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
7770
import static net.bytebuddy.matcher.ElementMatchers.takesNoArguments;
7871

@@ -89,7 +82,7 @@ public final class BBClientProxyClassGenerator {
8982
/**
9083
* Creates a new {@link BBClientProxyClassGenerator}.
9184
*
92-
* @param typePool a {@link TypePool} (normally a {@link TypeElementTypePool}); must not be {@code null}
85+
* @param typePool a non-{@code null} {@link TypePool} (normally a {@link TypeElementTypePool})
9386
*
9487
* @exception NullPointerException if {@code typePool} is {@code null}
9588
*/
@@ -101,14 +94,14 @@ public BBClientProxyClassGenerator(final TypePool typePool) {
10194
/**
10295
* Creates and returns a new {@link DynamicType.Unloaded} representing a client proxy class.
10396
*
104-
* @param name the name of the client proxy class; must not be {@code null}; must be a valid Java class <a
97+
* @param name the non-{@code null} name of the client proxy class; must be a valid Java class <a
10598
* href="https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/ClassLoader.html#binary-name">binary
10699
* name</a>
107100
*
108-
* @param superclass a {@link TypeDefinition} representing a superclass; must not be {@code null}
101+
* @param superclass a non-{@code null} {@link TypeDefinition} representing a superclass
109102
*
110-
* @param interfaces a {@link Collection} of {@link TypeDefinition}s representing interfaces the client proxy class
111-
* will implement; must not be {@code null}
103+
* @param interfaces a non-{@code null} {@link Collection} of {@link TypeDefinition}s representing interfaces the
104+
* client proxy class will implement
112105
*
113106
* @return a new, non-{@code null} {@link DynamicType.Unloaded} representing a client proxy class
114107
*

0 commit comments

Comments
 (0)