classes implement should respect interface extends
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading the examples in the issue and the ArchUnit APIs for classes(), implement(), and haveSimpleNameEndingWith(). The request combines interface matching, composed-annotation detection, and a new reflexive rule API, without choosing a specific scope or expected behavior; clarify which capability should be addressed before estimating completion.
Written by the indexing model from the issue text.
Description
I have
@Value.Immutable
@ValueObject
public interface MyId extends Identifier {
}
and I want to validate
classes().that().implement(Identifier.class).should().haveSimpleNameEndingWith("Id")
even if we agree this is not the right code, I don't see any way to validate the interface. Given I'm using the immutables library, this seems the correct placing.
Additionally, I tried creating an @ImmutableValueObject and annotate it with @ValueObject using immutables @InjectAnnotation and it seems there isn't any way to validate that the annotation exists if it's a composed annotation.
lastly it'd be nice to be able to say something here like
classes().that().implement(Identifier.class).should().haveSimpleNameEndingWith("Id").reflexively()
which would imply
classes().that().implement(Identifier.class).should().haveSimpleNameEndingWith("Id")
classes().that().haveSimpleNameEndingWith("Id").should().implement(Identifier.class)
- Dominant language
- Java
- Stars
- 3.9k
- Forks
- 350
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TNG/ArchUnit
-
PackageMatcher wildcards don't match package names with non-ASCII lettersPossibly taken @StefanPenndorf claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
beFreeOfCycles() misses cycles: TarjanComponentFinder does not return the component with the lowest node indexPossibly taken @StefanPenndorf claimed this 3 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
TNG/ArchUnit#1773 · 1 comment ·
Maintainers usually reply within 1 day
-
Constructor parameters added by the compiler (inner classes, enums) make `getParameters()` / `getParameterTypes()` inconsistent and misplace parameter annotationsPossibly taken @SamuelAdigos claimed this 4 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 48/100
TNG/ArchUnit#1772 · 3 comments ·
Maintainers usually reply within 1 day
-
breaking change
Difficulty 5/5 Over a week Newbie friendliness 18/100
TNG/ArchUnit#1756 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
BindingServiceProperties.bindings regressed to a non-thread-safe TreeMap in GH-3158: concurrent first use of binding names corrupts itPossibly taken @AkashB23 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
spring-cloud/spring-cloud-stream#3321 ·
Maintainers usually reply within 1 day
-
[Bug] 资源包列表 与 模组/数据包/世界 列表排列顺序不一致Possibly taken @fishdry1000 claimed this 4 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
ai-driven-fuzzing bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
linagora/twake-calendar-side-service#1333 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
AtlasOfLivingAustralia/species-lists#882 ·
Maintainers usually reply within 1 day
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ballerina-platform/ballerina-library#9458 ·
Maintainers usually reply within 1 day