|
http://www.jindent.com |
Previous: Empty Statements/Declarations
|
Next: Space Before/After
|
| Parentheses |
| Padding parentheses of constructor and method declarations |

|
public·void·method(·int·a,·int·b·)·{ ... } |
|
public·void·method(int·a,·int·b)·{ ... } |
| Padding parentheses of constructor and method calls |

|
if·(a·<·10)·{ callMethod(·int·a·); ... } |
|
if·(a·<·10)·{ callMethod(int·a); ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| No padding of empty parentheses |

|
public·void·method(·int·a,·int·b·)·{ callMethod(·int·a·); doNothing(·); ... } public·void·doNothing(·)·{ ... } |
|
public·void·method(·int·a,·int·b·)·{ callMethod(·int·a·); doNothing(); ... } public·void·doNothing()·{ ... } |
| Padding expression parentheses |

|
boolean·value·=·(·x·==·10·)·||·(·0·<·y·); |
|
boolean·value·=·(x·==·10)·||·(0·<·y); |
|
See also: | Combine padding parentheses to prevent white spaces |
| Padding parentheses of single-member annotations |

|
@Copyright(·"2002·Yoyodyne·Propulsion·Systems,·Inc.,·All·rights·reserved."·) public·class·ClassA·{ ... } |
|
@Copyright("2002·Yoyodyne·Propulsion·Systems,·Inc.,·All·rights·reserved.") public·class·ClassA·{ ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| Padding parentheses of normal annotations |

|
@RequestForEnhancement(·id=2868724,·synopsis="Provide·time-travel·functionality"·) public·float·methodA()·{ ... } |
|
@RequestForEnhancement(id=2868724,·synopsis="Provide·time-travel·functionality") public·float·methodA()·{ ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| Padding parentheses of for statements |

|
@RequestForEnhancement(·id=2868724,·synopsis="Provide·time-travel·functionality"·) public·float·methodA()·{ ... } |
|
@RequestForEnhancement(id=2868724,·synopsis="Provide·time-travel·functionality") public·float·methodA()·{ ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| Padding parentheses of if statements |

|
@RequestForEnhancement(·id=2868724,·synopsis="Provide·time-travel·functionality"·) public·float·methodA()·{ ... } |
|
@RequestForEnhancement(id=2868724,·synopsis="Provide·time-travel·functionality") public·float·methodA()·{ ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| Padding parentheses of while statements |

while statements or not.|
while·(·i·<·10·)·{ ... } |
|
while·(i·<·10)·{ ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| Padding parentheses of catch statements |

catch statements or not.|
try·{ ... }·catch·(·Exception·e·)·{ ... } |
|
try·{ ... }·catch·(Exception·e)·{ ... } |
| Padding parentheses of switch statements |

switch statements or not.|
switch·(·a·)·{ case·1·: ... } |
|
switch·(a)·{ case·1·: ... } |
| Padding parentheses of synchronized statements |

synchronized statements or not.|
synchronized·(·a·)·{ ... } |
|
synchronized·(a)·{ ... } |
| Padding parentheses of castings |

|
int·value·=·(·int·)·floatValue; |
|
int·value·=·(int)·floatValue; |
|
See also: | Combine padding parentheses to prevent white spaces |
| Padding parentheses of enum constants |

enum constants or not.|
enum·Nummer·{ EINS·(·1·),·ZWEI·(·2·),·DREI·(·3·),·VIER·(·4·) } |
|
enum·Nummer·{ EINS·(1),·ZWEI·(2),·DREI·(3),·VIER·(4) } |
| Combine padding parentheses to prevent white spaces |

|
if(·(·(·x·==·10·)·||·(·0·<·y·)·)·&&·(·y·<=·10·)·)·{ ... } |
|
if(((·x·==·10·)·||·(·0·<·y·))·&&·(·y·<=·10·))·{ ... } |
| Brackets |
| Padding brackets |

|
intArray[·1·]·=·10; |
|
intArray[1]·=·10; |
| No padding of empty brackets |

|
int[·]·intArray·=·new·int[·10·]; |
|
int[]·intArray·=·new·int[·10·]; |
| Braces |
| Padding braces of initializers |

|
enum·Nummer·{·EINS(1),·ZWEI(2),·DREI(3),·VIER(4)·} int[]·intArray={·1,·2,·3·} |
|
enum·Nummer·{EINS(1),·ZWEI(2),·DREI(3),·VIER(4)} int[]·intArray={1,·2,·3} |
|
See also: | Jindent - Settings - Formatter - Java / SQLJ - Line Wrapping - Line Up Elements |
| No padding of empty braces in initializers |

|
int·[]·intArray·=·{·}; |
|
int·[]·intArray·=·{}; |
|
See also: | Jindent - Settings - Formatter - Java / SQLJ - Braces Style - General |
| Operators |
| Padding assignment operators = += -= /= *= ... |

|
int·x·=·y-1; |
|
int·x=y-1; |
| Padding conditional operators && || |

|
boolean·b·=·condition1·&&·(condition2·||·condition3); |
|
boolean·b·=·condition1&&(condition2||condition3); |
| Padding equality operators == != |

|
boolean·b·=·(value1·==·value2)·||·(value3·!=·value4); |
|
boolean·b·=·(value1==value2)·||·(value3!=value4); |
| Padding relational operators < > <= => |

|
boolean·b·=·(value1·<·value2)·||·(value3·=>·value4); |
|
boolean·b·=·(value1<value2)·||·(value3=>value4); |
| Padding additive operators + - |

|
int·value·=·a·+·b·-·c; |
|
int·value·=·a+b-c; |
| Padding multiplicative operators * / % |

|
float·value·=·a·*·b·/·c; |
|
float·value·=·a*b/c; |
| Padding bitwise operators & | ^ |

|
int·value·=·a·&·255·|·b; |
|
int·value·=·a&255|b; |
| Padding shift operators << >> >>> |

|
byte·value·=·a·<<·3; |
|
byte·value·=·a<<3; |
| Generics |
| Padding braces of generics |

|
interface·MyInterface<·T·>·{ ···... } |
|
interface·MyInterface<T>·{ ···... } |