-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ectly getting correct binary names. Now all type like class, interface, annotations, enums and records will be taken into account.
- Loading branch information
1 parent
3722ff6
commit f2fc768
Showing
8 changed files
with
158 additions
and
25 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
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
25 changes: 25 additions & 0 deletions
25
tools/src/main/java/io/toolisticon/aptk/tools/matcher/impl/IsTypeMatcher.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,25 @@ | ||
package io.toolisticon.aptk.tools.matcher.impl; | ||
|
||
import io.toolisticon.aptk.tools.ElementUtils; | ||
import io.toolisticon.aptk.tools.matcher.ImplicitMatcher; | ||
|
||
import javax.lang.model.element.Element; | ||
|
||
|
||
/** | ||
* Implicit matcher that checks if a passed element is a type (i.e of Kind CLASS, INTERFACE or RECORD). | ||
*/ | ||
public class IsTypeMatcher<ELEMENT extends Element> implements ImplicitMatcher<ELEMENT> { | ||
|
||
@Override | ||
public boolean check(ELEMENT element) { | ||
return ElementUtils.CheckKindOfElement.isClass(element) | ||
|| ElementUtils.CheckKindOfElement.isInterface(element) | ||
|| ElementUtils.CheckKindOfElement.isEnum(element) | ||
|| ElementUtils.CheckKindOfElement.isAnnotation(element) | ||
|| ElementUtils.CheckKindOfElement.isRecord(element); | ||
} | ||
|
||
} | ||
|
||
|
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
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