mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
When compilig with Java 9 and and source version 1.8 Elements#getTypeElement(CharSequence) returns the types from all modules (such as java.xml.bind or java.xml.datatype). However if the required modules are not added the classes cannot be used. Therefore, apart from using the Elements we are also checking if the class is also there. If source version 9 is used then Elements#getTypeElement(CharSequence) works correctly and does not return the types if the modules are not there