Content area

Abstract

The two most significant yet complex elements of Java generics are wildcards and type argument inference. Both processes rely on the compiler. Even though type argument inference and wildcard execution are implicit processes, a programmer should be aware of them to make the most of the features. A compiler error message tells much about the code and the process mechanism. If the error message is unambiguous and sound, it is easy for the programmer to debug the code. However, in the context of wildcard-type argument inference, the current Javac compiler emits cryptic and imprecise error messages. A programmer may get confused about the inference outcome and failure, so it will be difficult to resolve the errors easily. In this paper, we propose a few additions to the current Wildcard-based type inference algorithm to get detailed and valuable error messages. We implement a Java compiler plugin tool based on the proposed algorithm. The plugin can be easily executed through the Java command line. It gives a comprehensive error message that aids programmers in resolving errors more effectively.

Details

1009240
Title
A Java Compiler Plugin for Type-Safe Inferences in Generics
Author
Publication title
Volume
31
Issue
4
Pages
312-337
Publication year
2025
Publication date
2025
Section
Research Article
Publisher
Pensoft Publishers
Place of publication
Bristol
Country of publication
Bulgaria
Publication subject
ISSN
0948695X
e-ISSN
09486968
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
Publication history
 
 
Online publication date
2025-03-28
Milestone dates
2023-05-09 (Received); 2024-11-09 (Accepted)
Publication history
 
 
   First posting date
28 Mar 2025
ProQuest document ID
3185951568
Document URL
https://www.proquest.com/scholarly-journals/java-compiler-plugin-type-safe-inferences/docview/3185951568/se-2?accountid=208611
Copyright
© 2025. This work is licensed under https://creativecommons.org/licenses/by-nd/4.0/ (the “License”). Notwithstanding the ProQuest Terms and conditions, you may use this content in accordance with the terms of the License.
Last updated
2025-04-04
Database
ProQuest One Academic