4 ms·
Java's annotations (which are mostly equivalent to C#'s attributes) can be consumed at compile time using annotation processors. If C# had this feature for attr
by lIl-IIIl 1y ago
Java's annotations (which are mostly equivalent to C#'s attributes) can be consumed at compile time using annotation processors. If C# had this feature for attributes, could attributes have been used here?
- Kuinox 1y agoC# have this feature, it's called roslyn code generator. I believe your java annotations cannot change the build parameters of the package being currently compiled, which is why you wouldnt be able to do that in java. btw, anything that is present in the AST could be used for that, but I think the preprocessor directive is the most sensible choice.