Verifies that Java elements are vertically aligned in immediately consecutive lines (and only there!):
public class Main {
int x = 7;
double xxx = 7.0; // Aligned field names
int y = 7;
double yyy = 7.0; // Aligned field initializers
public static void meth1(
String[] p1,
int p2 // Aligned parameter names
) {
int x = 7;
double xxx = 7.0; // Aligned local variable names
int y = 7;
double yyy = 7.0; // Aligned local variable initializers
y = 8;
yyy = 8.0; // Aligned assignments
switch (x) {
case 1: break;
default: x++; return; // Aligned case groups statements
}
}
public static void meth2() {}
public void meth33() {} // Aligned method names
public void meth4() { a(); }
public void meth5() { foo(); } // Aligned method bodies
}
-
-
Property Detail
-
applyToFieldName = "true|false"
Check alignment of first name in field declarations.
-
applyToFieldInitializer = "true|false"
Check alignment of first "=
" in field declarations.
-
applyToParameterName = "true|false"
Check alignment of method (and constructor) parameter names.
-
applyToLocalVariableName = "true|false"
Check alignment of first name in local variable declarations.
-
applyToLocalVariableInitializer = "true|false"
Check alignment of first "=
" in local variable declarations.
-
applyToAssignments = "true|false"
Check alignment of "=
" in assignments.
-
applyToCaseGroupStatements = "true|false"
Check alignment of first statement in case groups.
-
applyToMethodName = "true|false"
Check alignment of method (and constructor) names in declarations.
-
applyToMethodBody = "true|false"
Check alignment of "{
" and "}
" in method (and constructor) declarations.