Skip to content
Closed
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: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.x-GH-3344-SNAPSHOT</version>

<name>Spring Data Core</name>
<description>Core Spring concepts underpinning every Spring Data module.</description>
Expand Down
8 changes: 4 additions & 4 deletions src/main/antora/resources/antora-resources/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ asciidoc:
copyright-year: ${current.year}
springversionshort: ${spring.short}
springversion: ${spring}
spring-data-commons-docs-url: https://docs.spring.io/spring-data/commons/reference/{version}
spring-data-commons-javadoc-base: https://docs.spring.io/spring-data/commons/reference/{version}/api/java
springdocsurl: https://docs.spring.io/spring-framework/reference/{springversionshort}
spring-data-commons-docs-url: '${documentation.baseurl}/spring-data/commons/reference/{version}'
spring-data-commons-javadoc-base: '{spring-data-commons-docs-url}/api/java'
springdocsurl: '${documentation.baseurl}/spring-framework/reference/{springversionshort}'
spring-framework-docs: '{springdocsurl}'
springjavadocurl: https://docs.spring.io/spring-framework/docs/${spring}/javadoc-api
springjavadocurl: '${documentation.spring-javadoc-url}'
spring-framework-javadoc: '{springjavadocurl}'
springhateoasversion: ${spring-hateoas}
releasetrainversion: ${releasetrain}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
*/
package org.springframework.data.repository.aot.generate;

import org.springframework.core.ResolvableType;
import org.springframework.javapoet.CodeBlock;
import org.springframework.javapoet.MethodSpec;
import org.springframework.javapoet.TypeName;

/**
* Builder for AOT Repository Constructors.
Expand All @@ -41,7 +42,7 @@ public interface AotRepositoryConstructorBuilder {
* @param parameterName name of the parameter.
* @param type parameter type.
*/
default void addParameter(String parameterName, TypeName type) {
default void addParameter(String parameterName, ResolvableType type) {
addParameter(parameterName, type, true);
}

Expand All @@ -52,7 +53,18 @@ default void addParameter(String parameterName, TypeName type) {
* @param type parameter type.
* @param createField whether to create a field for the parameter and assign its value to the field.
*/
void addParameter(String parameterName, TypeName type, boolean createField);
default void addParameter(String parameterName, Class<?> type, boolean createField) {
addParameter(parameterName, ResolvableType.forClass(type), createField);
}

/**
* Add constructor parameter.
*
* @param parameterName name of the parameter.
* @param type parameter type.
* @param createField whether to create a field for the parameter and assign its value to the field.
*/
void addParameter(String parameterName, ResolvableType type, boolean createField);

/**
* Add constructor customizer. Customizer is invoked after adding constructor arguments and before assigning
Expand All @@ -72,7 +84,7 @@ interface ConstructorCustomizer {
*
* @param builder the constructor builder to be customized.
*/
void customize(MethodSpec.Builder builder);
void customize(CodeBlock.Builder builder);

}

Expand Down
Loading