Skip to content

Plugin for the IntelliJ IDEA IDE. Provides inspections for checking getters.

License

Notifications You must be signed in to change notification settings

profeg/IntelliJGettersInspections

Repository files navigation

#Plugin for the IntelliJIdea IDE.

Installation:

Download jar file from JetBrains Plugins
File -> Settings -> Install plugin from disk
All inspections is on by default.

Description:

This plugin contains four inspections.

Check for name of a boolean property getter

In accordance with the JavaBeans specification section 8.3.2:

Boolean properties: In addition, for boolean properties, we allow a getter method to match the pattern: public boolean is();This "isPropertyName" method may be provided instead of a "get" method,or it may be provided in addition to a "get" method. In either case,if the is method is present for a boolean property then we will usethe "is" method to read the property value. An example boolean property might be:

````java public boolean isMarsupial(); public void setMarsupial(boolean m); ```` ### Check for a probably getter This method have only return instructions. Probably this is a getter. ### Check for a clashing getter names Assume you have two methods with signatures 'getX()' and 'isX()'. Both methods are getters for property 'x'. So the result of invoking 'foo.x' can be unexpected. This inspection reports methods which have such a problem. ### Check for a methods name started from modal verb and probably getter This method started from a modal verb. Probably this is a getter. ## Changelog: [All releases](https://github.com/profeg/IntelliJGettersInspections/releases)

###v1.0 Release version.
Source

About

Plugin for the IntelliJ IDEA IDE. Provides inspections for checking getters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published