Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
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
16 changes: 13 additions & 3 deletions codegen-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@
<scope>test</scope>
</dependency>

<!-- Jackson for parsing the tracker's JSON report in tests -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
<scope>test</scope>
</dependency>


</dependencies>

Expand Down Expand Up @@ -340,12 +348,14 @@
</goals>
<configuration>
<excludes>
<!-- Exclude DTOs (model package) from coverage -->
<exclude>**/codegen/model/**</exclude>
<!-- Exclude DTOs (model packages) and enums from coverage: no logic to test -->
<exclude>**/model/**</exclude>
<exclude>**/enums/**</exclude>
<!-- Exclude exception classes from coverage (simple constructors) -->
<exclude>**/*Exception.*</exclude>
<exclude>**/exceptions/**</exclude>
<!-- Exclude constants-only holders -->
<exclude>**/JavadocConstants.*</exclude>
<exclude>**/*Constants.*</exclude>
</excludes>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ public String getFullQualifiedName() {
return packageName.isEmpty() ? className : packageName + "." + className;
}

/** Returns the full qualified name of this type. */
@Override
public String toString() {
return getFullQualifiedName();
}

/**
* Returns the list of annotations on this type.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.javahelpers.codegen.model.type;

import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import org.apache.commons.lang3.builder.EqualsBuilder;
Expand Down Expand Up @@ -102,6 +103,18 @@ public TypeNameGeneric(String packageName, String className, TypeName... innerTy
this.innerTypeArguments = List.of(innerTypeArguments);
}

/**
* Varargs convenience constructor taking {@link Class} references directly.
*
* @param outerType the outer type
* @param innerTypeArguments variable number of generic type arguments
*/
public TypeNameGeneric(Class<?> outerType, Class<?>... innerTypeArguments) {
this(
TypeName.of(outerType),
Arrays.stream(innerTypeArguments).map(TypeName::of).toArray(TypeName[]::new));
}

/**
* Returns the raw type (without type parameters).
*
Expand Down
Loading
Loading