Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug #5 #6

Merged
merged 1 commit into from
Apr 9, 2020
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
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.4](https://search.maven.org/artifact/de.quantummaid.reflectmaid/reflectmaid-parent/0.1.4/jar) - 2020-04-09
### Added
- Apache2 badge (Issue [#1](https://github.com/quantummaid/reflectmaid/issues/1).
- Other badges.
- Apache2 badge ([#1](https://github.com/quantummaid/reflectmaid/issues/1)).
- Other badges.
### Changed
- Fixed bug [#5](https://github.com/quantummaid/reflectmaid/issues/5).
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ support generic types (see [Type Erasure](https://docs.oracle.com/javase/tutoria

To work around the aforementioned limitation, QuantumMaid offers the `GenericClass` type.
Whenever a configuration method takes a parameter of type `java.lang.Class`, there will be an overloaded variant
of that configuration method that accepts a `GenericType` parameter instead of the `java.lang.Class` parameter.
of that configuration method that accepts a `GenericType` parameter instead of the `java.lang.Class` parameter.

## Synthetic methods, constructors and fields
[Synthetic methods, constructors and fields](https://www.baeldung.com/java-synthetic) are ignored by ReflectMaid.
This is recommended [to support tools like JaCoCo](https://www.jacoco.org/jacoco/trunk/doc/faq.html).
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>de.quantummaid.reflectmaid</groupId>
<artifactId>reflectmaid-parent</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>

<properties>
<plugin-update-file-checksum>35fe547b725ca8e71b0d13c8c21894df</plugin-update-file-checksum>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public final class ResolvedConstructor {

public static List<ResolvedConstructor> resolveConstructors(final ClassType fullType) {
return stream(fullType.assignableType().getDeclaredConstructors())
.filter(constructor -> !constructor.isSynthetic())
.map(constructor -> resolveConstructor(constructor, fullType))
.collect(toList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public final class ResolvedField {
public static List<ResolvedField> resolvedFields(final ClassType fullType) {
final Class<?> type = fullType.assignableType();
return stream(type.getDeclaredFields())
.filter(field -> !field.isSynthetic())
.map(field -> {
final ResolvedType resolved = resolveType(field.getGenericType(), fullType);
return resolvedField(field.getName(), resolved, field);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static List<ResolvedMethod> resolveMethodsWithResolvableTypeVariables(fin
final Class<?> type = fullType.assignableType();
final Method[] declaredMethods = type.getDeclaredMethods();
return stream(declaredMethods)
.filter(method -> !method.isSynthetic())
.map(method -> {
try {
return of(resolveMethod(method, fullType));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public static List<ResolvedParameter> resolveParameters(final Executable executa
.collect(toList());
}

public static ResolvedParameter resolveParameter(final ClassType declaringType,
final Parameter parameter) {
private static ResolvedParameter resolveParameter(final ClassType declaringType,
final Parameter parameter) {
NotNullValidator.validateNotNull(declaringType, "declaringType");
NotNullValidator.validateNotNull(parameter, "parameter");

Expand Down