Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

javac-warning-annotation

> 编程语言
Open source

Lightweight javac @Warning annotation

99 stars0 likes1 views
WebsiteGitHub

About

Lightweight javac @Warning annotation

##Lightweight javac @Warning annotation

FAQ:

Q: What is @Warning annotation for?

A: For throwing warning messages from java compiler (javac).

Q: When and why can you use it?

A: When you want to mark some piece of code as "dangerous" or "unstable", etc. (Don't do it often)

Q: Why not to use // TODO or FIXME comments, etc?

A: Because they don't throw compile time warnings by default (depends on IDE, settings, etc.)

Q: What is the size of the library?

A: About 3kb, nothing for runtime, only two classes: @Warning annotation and annotation processor.


Usage:

java
    // some code...
    
    @Warning("Add caching")
    public void getData() {
        // bad stuff going on here...
    }

###Download

Gradle:

groovy
provided 'com.pushtorefresh:javac-warning-annotation:1.0.0'

// Library doesn't bring anything to the runtime
// So you can use provided scope instead of compile 

Maven:

xml

  com.pushtorefresh
  javac-warning-annotation
  1.0.0

Or grab jar directly from mavenCentral


Notice, if you use another annotation processors — you may need to exclude

'META-INF/services/javax.annotation.processing.Processor'

For Android Gradle setup in can be done like that:

build.gradle:

groovy
    android {
        
        // ...
        
        packagingOptions {
            exclude 'META-INF/services/javax.annotation.processing.Processor'
        }
    }

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言