Type and method names are usually not abbreviated (except for the well-accepted abbreviations such as EOF, Impl, Fifo, etc.).
RULE 1
The variable name should be as short as possible yet to be descriptive enough in a given context.
RULE 2
The descriptiveness of the variable name should be proportional to its significance in a given context.
There is a simple custom plugin available that performs on-the-fly check of variable names and highlights incorrectly named variables.
Plugin can be downloaded from wiki: ignite-abbrev-plugin.jar
Source code of plugin can be found at GitHub ignite-abbrev-plugin
Note that in some cases it is allowable to abbreviate a word to its first letter (like, for a example, when there is a naming conflict, on in a loop variables, or in a catch clause). Note also that class on instance fields should almost never be abbreviated to one letter and should use instead the common abbreviations below.
In some rare cases one-letter names can be augmented by number like in common nested catch clause example: e, e1, e2.
Name | Abbreviation |
---|---|
address | addr |
administration | admin |
argument | arg |
array | arr |
attachment | attach |
attributes | attrs |
buffer | buf |
certificate | cert |
callable | call, c |
char | c |
channel | ch; DO NOT USE chnl |
class | cls |
closure | c, clo, f (from function) |
collection | col, c |
command | cmd |
communication | comm |
comparator | comp |
condition | cond |
config | cfg |
context | ctx |
control | ctrl |
coordinator | crd |
copy | cp |
counter | cntr |
count | cnt |
current | curr, cur |
database | db |
declar{e|ation} | decl |
default | dflt |
delete | del |
delimiter | delim |
description | desc |
descriptor | descr |
destination | dest |
directory | dir |
event | evt |
exception | e, e2, ex |
execute | exec |
expected | exp |
externalizable | ext |
frequency | freq |
future | fut |
group | grp |
handler | hnd |
header | hdr |
implementation | impl |
index | idx |
initial(ize) | init |
int | i |
interface | itf |
iterator | iter |
listener | lsnr |
lable | lbl |
license | lic |
local | loc |
locale | loc |
logger | log |
loader | ldr |
manager | mgr |
message | msg |
method | mtd |
microkernel | mk |
milliseconds | ms |
multicast | mcast |
mutex | mux |
network | net |
number | n, num |
object | obj |
package | pkg |
parameter | param |
permission(s) | perm(s) |
password | pwd |
pattern | ptrn |
policy | plc |
predicate | pred |
priority | pri |
projection(s) | prj(s) |
property(ies) | prop(s) |
protocol | proto |
process | proc |
query | qry |
receive | rcv |
recipient | rcpt |
reference | ref |
regular expression | regex |
remove,removed | rmv |
rename | ren |
repository | repo |
request | req |
resource | rsrc |
response | res |
return value | retval |
send, sender | snd |
serializable | ser |
service | srvc |
session | ses |
sequence | seq |
sibling | sib |
size | sz |
socket | sock |
source | src |
specification | spec |
strategy | stgy |
string | s, str |
subject | subj |
system | sys |
table | tbl |
taxonomy | tax |
timestamp | ts |
topology | top |
token | tok |
unicast | ucast |
value | val |
version | ver |
windows | win |