Jindent - Java Source Code Formatter http://www.jindent.com
 



title
5.6.1.9.6 Annotations

Put annotations always on new line

Put annotations always on new line

Puts annotations always on a new line.


Annotations on new lines:

@MarkerAnnotation1                      
@MarkerAnnotation2                      
public class ClassA {                   
    ...                                 
}                                       


Annotations not on new lines:

@MarkerAnnotation1 @MarkerAnnotation2 public class ClassA {
    ...                                 
}                                       

See also... See also: Maximal number of marker annotations lined up in one line as prefix before other declarations




Maximal number of marker annotations lined up in one line as prefix before other declarations

Maximal number of marker annotations lined up
	in one line as prefix before other declarations

Specifies how many marker annotations are lined up in one row as a prefix for declarations.


Line up to 2 elements in one row:

@MarkerAnnotation1 @MarkerAnnotation2 public class ClassA {
    ...                                 
}                                       
                                        
@MarkerAnnotation1 
public class ClassB {
    ...                                 
}                                       
                                        
@MarkerAnnotation1 @MarkerAnnotation2 @MarkerAnnotation3 

public class ClassC {                   
    ...                                 
}                                       


Line up 1 element in one row:

@MarkerAnnotation1 @MarkerAnnotation2   
public class ClassA {                   
    ...                                 
}                                       
                                        
@MarkerAnnotation1 
public class ClassB {
    ...                                 
}                                       
                                        
@MarkerAnnotation1 @MarkerAnnotation2 @MarkerAnnotation3 

public class ClassC {                   
    ...                                 
}                                       

To line up all annotations in one row use setting value infinite.
To line up no annotations in one row use setting value 0.


See also... See also: Brace style for Class/interface/annotation declarations




Maximal number of annotation assignments lined up within parentheses

Maximal number of annotation assignments
	lined up within parentheses

Specifies how many marker annotations are lined up in one row as a prefix for declarations.


Line up to 2 elements in one row:

@Author(@Name(first = "Joe", last = "Hacker"))
class ClassA {                          
    ...                                 
}                                       
@Address(                               
    firstname = 
"Joe",                  
    lastname = 
"Hacker",                
    street = 
"Sesame Street",           
    city = 
"City"                       
)                                       
class ClassB {                          
    ...                                 
}                                       


Line up no elements in one row:

@Author(@Name(                          
    first = 
"Joe",                      
    last = 
"Hacker"                     
))                                      
class ClassA {                          
    ...                                 
}                                       
@Address(                               
    firstname = 
"Joe",                  
    lastname = 
"Hacker",                
    street = 
"Sesame Street",           
    city = 
"City"                       
)                                       
class ClassB {                          
    ...                                 
}                                       

To line up all annotation assignments in one row use setting value infinite.
To line up no annotation assignments in one row use setting value 0.


See also... See also: Brace style for Class/interface/annotation declarations , Align assignments




Maximal number of annotation array values lined up in one line

Maximal number of annotation array values
	lined up in one line

Specifies how many annotation values are lined up in one row as prefix.


Line up to 3 elements in one row:

@Annotation({ "value1""value2""value3" })
public void methodA() {                 
    ...                                 
}                                       
                                        
@
Annotation({                           
    
"value1""value2""value3""value4""value5"
})                                      
public void methodB() {                 
    ...                                 
}                                       


Line up no element in one row:

@Annotation({                           
    
"value1""value2""value3"        
})                                      
public void methodA() {                 
    ...                                 
}                                       
                                        
@
Annotation({                           
    
"value1""value2""value3""value4""value5"
})                                      
public void methodB() {                 
    ...                                 
}                                       

To line up all annotation values in one row use setting value infinite.
To line up no annotation values in one row use setting value 0.


See also... See also: Brace style for Class/interface/annotation declarations




Wrap after left parentheses ( on demand

Wrap after left parentheses ( on demand

Enables line wrapping after left parentheses of annotations on demand. Usually this kind of line wrapping is only needed in some very rare cases. Enabling of this setting is recommended.