Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![Maven Central](https://img.shields.io/maven-central/v/org.microbean/microbean-proxy.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.microbean/microbean-proxy)

![0% AI](https://img.shields.io/badge/%F0%9F%A4%96_AI-0%25_%F0%9F%8C%BC-brightgreen)

The microBean™ Proxy project provides classes and interfaces assisting with implementing proxy classes.

# Status
Expand All @@ -28,7 +30,7 @@ dependency:
<groupId>org.microbean</groupId>
<artifactId>microbean-proxy</artifactId>
<!-- Always check https://central.sonatype.com/artifact/org.microbean/microbean-proxy for up-to-date available versions. -->
<version>0.0.5</version>
<version>0.0.6</version>
</dependency>
```

Expand Down
18 changes: 3 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<!-- maven-javadoc-plugin properties -->
<bottom><![CDATA[Copyright &copy; ${project.inceptionYear}&ndash;{currentYear}, <a href="${project.organization.url}" target="_top">${project.organization.name}</a>. All rights reserved.]]></bottom>
<doctitle>&lt;a href="${project.url}" target="_top"&gt;&lt;span style="font-family:Lobster, cursive;"&gt;µb&lt;/span&gt; ${project.artifactId}&lt;/a&gt; ${project.version}</doctitle>
<links>https://microbean.github.io/microbean-attributes/apidocs/,https://microbean.github.io/microbean-bean/apidocs/,https://microbean.github.io/microbean-construct/apidocs/</links>
<links>https://microbean.github.io/microbean-bean/apidocs/,https://microbean.github.io/microbean-construct/apidocs/</links>
<sourcetab>2</sourcetab>

<!-- maven-release-plugin properties -->
Expand Down Expand Up @@ -127,35 +127,23 @@

<!-- Normal dependencies. -->

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-attributes</artifactId>
<version>0.0.5</version>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-bean</artifactId>
<version>0.0.22</version>
<version>0.0.23</version>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-construct</artifactId>
<version>0.0.18</version>
<version>0.0.24</version>
</dependency>

</dependencies>
</dependencyManagement>

<dependencies>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-attributes</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-bean</artifactId>
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
*
* Copyright © 2025 microBean™.
* Copyright © 2025–2026 microBean™.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -21,7 +21,6 @@

exports org.microbean.proxy;

requires transitive org.microbean.attributes;
requires transitive org.microbean.bean;
requires transitive org.microbean.construct;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/microbean/proxy/AbstractProxier.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
*
* Copyright © 2025 microBean™.
* Copyright © 2025–2026 microBean™.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
*
* Copyright © 2025 microBean™.
* Copyright © 2025–2026 microBean™.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
*
* Copyright © 2025 microBean™.
* Copyright © 2025–2026 microBean™.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
23 changes: 11 additions & 12 deletions src/main/java/org/microbean/proxy/ProxySpecification.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
*
* Copyright © 2025 microBean™.
* Copyright © 2025–2026 microBean™.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -15,13 +15,12 @@

import java.util.List;

import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.TypeElement;

import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;

import org.microbean.attributes.Attributes;

import org.microbean.bean.BeanTypeList;
import org.microbean.bean.Id;

Expand All @@ -34,7 +33,7 @@
import static org.microbean.bean.BeanTypes.proxiableBeanType;

/**
* Information about a proxy.
* Information about what requirements a {@link Proxy} must fulfil.
*
* @author <a href="https://about.me/lairdnelson" target="_top">Laird Nelson</a>
*/
Expand All @@ -53,7 +52,7 @@ public class ProxySpecification {

private final List<TypeMirror> interfaces;

private final List<Attributes> attributes;
private final List<AnnotationMirror> annotations;

private final String name;

Expand All @@ -79,7 +78,7 @@ public class ProxySpecification {
public ProxySpecification(final Domain domain, final Id id) {
super();
this.domain = domain; // not nullable
this.attributes = id.attributes();
this.annotations = id.annotations();
final BeanTypeList types = id.types();
final TypeMirror t = types.get(0); // putative superclass
if (t.getKind() != DECLARED || domain.javaLangObject(t) && types.size() == 1) {
Expand Down Expand Up @@ -125,7 +124,7 @@ public boolean equals(final Object other) {
return false;
}
}
return this.attributes().equals(her.attributes());
return this.annotations().equals(her.annotations());
} else {
return false;
}
Expand All @@ -137,17 +136,17 @@ public int hashCode() {
hashCode = 17 * hashCode + this.domain.hashCode();
hashCode = 17 * hashCode + this.superclass().hashCode();
hashCode = 17 * hashCode + this.interfaces().hashCode();
hashCode = 17 * hashCode + this.attributes().hashCode();
hashCode = 17 * hashCode + this.annotations().hashCode();
return hashCode;
}

/**
* Returns an immutable {@link List} of {@link Attributes} describing this {@link ProxySpecification}.
* Returns an immutable {@link List} of {@link AnnotationMirror}s describing this {@link ProxySpecification}.
*
* @return a non-{@code null}, immutable {@link List} of {@link Attributes} instances
* @return a non-{@code null}, immutable {@link List} of {@link AnnotationMirror} instances
*/
public final List<Attributes> attributes() {
return this.attributes;
public final List<AnnotationMirror> annotations() {
return this.annotations;
}

/**
Expand Down