Controls the white space handling for the individual components of Java statements.
Lets you choose the components that should get one leading space inserted before them.
Lets you choose what components should have one trailing space inserted after the component.
Controls what components should have both a leading and trailing space inserted. This is sometimes called "padding".
-
Assignment Operators
Example 4.20. Assignment Operators (=, +=, -=, *=, \=, %=, &=, |=, ^=, <<=, >>=, >>>=)
-
Logical Operators
Example 4.21. Logical Operators (&&, ||)
if((LA(1)=='/')&&(LA(2)!='*'||(LA(2)=='*'&&LA(3)!='*'))) ...
if((LA(1)=='/') && (LA(2)!='*' || (LA(2)=='*' && LA(3)!='*'))) ...
-
Relational Operators
Example 4.22. Relational Operators (==, !=, <, >, <=, >=)
if((LA(1)=='\n'||LA(1)=='\r')) ...
if((LA(1) == '\n'||LA(1) == '\r')) ...
-
Bitwise Operators
Example 4.23. Bitwise Operators (&, |, ^)
public static final boolean isUnix()
{
return (getOperatingSystem()&PLAT_UNIX) != 0;
}
public static final boolean isUnix()
{
return (getOperatingSystem() & PLAT_UNIX) != 0;
}
-
Mathematical Operators
Example 4.24. Mathematical Operators (+, -, /, *, %)
a=(b+c)*d;
a=(b + c) * d;
-
Shift Operators
Example 4.25. Shift Operators (<<, >>, >>>)
if(((1L<<i)&l)!=0)
System.out.print("1");
if(((1L << i)&l)!=0)
System.out.print("1");
-
Braces
Example 4.26. Braces
Object[] items = {"2", "3", "4"};
Object[] items = { "2", "3", "4" };
-
Brackets
Example 4.27. Brackets
for (i = 0; i < 100; i++)
sum += value[i];
for(i = 0; i < 100; i++)
sum += value[ i ];
-
Parentheses
Example 4.28. Parentheses
GridBagLayout layout = new GridBagLayout();
setLayout(layout);
GridBagLayout layout = new GridBagLayout();
setLayout( layout );
-
Type Cast Parentheses
Example 4.29. Type Cast Parentheses
int line = ((JavaAST)node).getStartLine();
int line = (( JavaAST )node).getStartLine();
|