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

Feature/148 records via reflection #149

Merged
merged 14 commits into from
Apr 11, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[#148] changed extension folder to integration test
tobiasstamann committed Apr 9, 2024
commit eeccbc4a4feb3218f250f728a4c1211dea306a54
17 changes: 9 additions & 8 deletions extensions/java16/pom.xml → integrationtest/java16/pom.xml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@

<parent>
<groupId>io.toolisticon.aptk</groupId>
<artifactId>extension-parent</artifactId>
<artifactId>integrationtest-parent</artifactId>
<version>0.24.1-148_records-SNAPSHOT</version>
</parent>

@@ -16,12 +16,6 @@

<dependencies>

<!-- Should transitively bind all extensions for lesser java versions -->
<dependency>
<groupId>io.toolisticon.aptk</groupId>
<artifactId>aptk-tools-java9</artifactId>
</dependency>

<dependency>
<groupId>io.toolisticon.aptk</groupId>
<artifactId>aptk-tools</artifactId>
@@ -57,7 +51,6 @@
</excludes>
<includes>
<include>io.toolisticon.aptk:aptk-tools:*</include>
<include>io.toolisticon.aptk:aptk-tools-java9:*</include>
<include>*:*:*:*:test:*</include>
<include>*:*:*:*:provided:*</include>
</includes>
@@ -84,6 +77,14 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>


</plugins>

9 changes: 8 additions & 1 deletion extensions/java9/pom.xml → integrationtest/java9/pom.xml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@

<parent>
<groupId>io.toolisticon.aptk</groupId>
<artifactId>extension-parent</artifactId>
<artifactId>integrationtest-parent</artifactId>
<version>0.24.1-148_records-SNAPSHOT</version>
</parent>

@@ -77,6 +77,13 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

</plugins>

4 changes: 2 additions & 2 deletions extensions/pom.xml → integrationtest/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>extension-parent</artifactId>
<artifactId>integrationtest-parent</artifactId>
<packaging>pom</packaging>

<parent>
@@ -10,7 +10,7 @@
<version>0.24.1-148_records-SNAPSHOT</version>
</parent>

<name>extension-parent</name>
<name>integrationtest-parent</name>


<!-- activate module support for Java 9 -->
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
<module>tools</module>
<module>example</module>
<module>templating</module>
<module>extensions</module>
<module>integrationtest</module>

<!-- wrapper processor -->
<module>annotationwrapper</module>
Original file line number Diff line number Diff line change
@@ -31,13 +31,24 @@ public ExecutableElementWrapper getAccessor() {
return ExecutableElementWrapper.wrap(this.<ExecutableElement>invokeParameterlessMethodOfElement("getAccessor", null));
}

/**
* Re-wraps an ElementWrapper to a RecordComponentElementWrapper.
* @param element the wrapper to re-wrap
* @return The RecordComponentElementWrapper or null if the passed ElementWrapper doesn't wrap a RecordComponentElement
*/
public static RecordComponentElementWrapper toRecordComponentElement(ElementWrapper<?> element) {
if (element == null) {
return null;
}
return RecordComponentElementWrapper.wrap(element.unwrap());
}

/**
* Wraps an element with the RecordComponentElementWrapper.
*
* @param element the element to wrap
* @return the wrapped element, or null if passed element isn't an RecordComponentElement
*/
public static RecordComponentElementWrapper wrap(Element element) {
if (element == null || !"RECORD_COMPONENT".equals(element.getKind().name())) {
return null;