-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix typeuse annotations not getting trimmed properly (#363)
* fix annotations not getting trimmed * use regex for annotation trimming * even better regex * Update Util.java * Update Util.java * Update UtilTest.java * correct trimming * Update Util.java
- Loading branch information
Showing
5 changed files
with
80 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
inject-generator/src/test/java/io/avaje/inject/generator/models/valid/aspect/MethodTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.avaje.inject.generator.models.valid.aspect; | ||
|
||
import java.util.Map; | ||
|
||
import io.avaje.inject.Component; | ||
import io.avaje.inject.generator.models.valid.Timed; | ||
|
||
@Component | ||
public class MethodTest { | ||
|
||
@Timed | ||
void test(@Param Map<@TypeUse String, String> str, @Param int inty, String regular) {} | ||
} |
3 changes: 3 additions & 0 deletions
3
inject-generator/src/test/java/io/avaje/inject/generator/models/valid/aspect/Param.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.avaje.inject.generator.models.valid.aspect; | ||
|
||
public @interface Param {} |
11 changes: 11 additions & 0 deletions
11
inject-generator/src/test/java/io/avaje/inject/generator/models/valid/aspect/TypeUse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.avaje.inject.generator.models.valid.aspect; | ||
|
||
import static java.lang.annotation.ElementType.TYPE_USE; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
@Target(TYPE_USE) | ||
@Retention(RUNTIME) | ||
public @interface TypeUse {} |