Javac warning annotation

Lightweight Java compiler @Warning annotation

License

License

GroupId

GroupId

com.pushtorefresh
ArtifactId

ArtifactId

javac-warning-annotation
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Javac warning annotation
Lightweight Java compiler @Warning annotation
Project URL

Project URL

https://github.com/pushtorefresh/javac-warning-annotation
Source Code Management

Source Code Management

https://github.com/pushtorefresh/javac-warning-annotation

Download javac-warning-annotation

How to add to project

<!-- https://jarcasting.com/artifacts/com.pushtorefresh/javac-warning-annotation/ -->
<dependency>
    <groupId>com.pushtorefresh</groupId>
    <artifactId>javac-warning-annotation</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.pushtorefresh/javac-warning-annotation/
implementation 'com.pushtorefresh:javac-warning-annotation:1.0.0'
// https://jarcasting.com/artifacts/com.pushtorefresh/javac-warning-annotation/
implementation ("com.pushtorefresh:javac-warning-annotation:1.0.0")
'com.pushtorefresh:javac-warning-annotation:jar:1.0.0'
<dependency org="com.pushtorefresh" name="javac-warning-annotation" rev="1.0.0">
  <artifact name="javac-warning-annotation" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.pushtorefresh', module='javac-warning-annotation', version='1.0.0')
)
libraryDependencies += "com.pushtorefresh" % "javac-warning-annotation" % "1.0.0"
[com.pushtorefresh/javac-warning-annotation "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

##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:

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

###Download

Gradle:

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:

<dependency>
  <groupId>com.pushtorefresh</groupId>
  <artifactId>javac-warning-annotation</artifactId>
  <version>1.0.0</version>
</dependency>

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:

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

Pushtorefresh

Versions

Version
1.0.0