public interface JavaPreferences
Modifier and Type | Interface and Description |
---|---|
static interface |
JavaPreferences.MemberOrder
Defines keys within the member order hash structure.
|
Modifier and Type | Field and Description |
---|---|
static int |
ALIGN_ANONYMOUS_CLASS
True align anonymous class bodies with the previous indent.
|
static int |
ALIGN_ARRAY_INITIALIZERS
True aligns array initializers with the previous indent.
|
static int |
ALIGN_VARIABLE_NAMES
True means align variable names in groups of field and local declarations.
|
static int |
BLANKLINES_AFTER_LAST_MEMBER
Indicates the number of blank lines after the last child in a
class body, including comments.
|
static int |
BLANKLINES_BEFORE_DOC_COMMENT
Indicates the number of blank lines before a doc comment that
documents a class or a class member.
|
static int |
BLANKLINES_BEFORE_FIELD
Indicates the number of blank lines before a field declaration.
|
static int |
BLANKLINES_BEFORE_FIRST_CLASS
Indicates the number of blank lines before the class declaration
(i.e.
|
static int |
BLANKLINES_BEFORE_FIRST_MEMBER
Indicates the number of blank lines before the first child in a
class body, including comments.
|
static int |
BLANKLINES_BEFORE_MEMBER_CLASS
Indicates the number of blank lines before a member type declaration.
|
static int |
BLANKLINES_BEFORE_METHOD
Indicates the number of blank lines before a method declaration.
|
static int |
BLANKLINES_EMPTY_ANONYMOUS
Indicates the number of blank lines to place in an empty
anonymous class body.
|
static int |
BLANKLINES_EMPTY_BLOCK
Indicates the number of blank lines to place in an empty code block.
|
static int |
BLANKLINES_EMPTY_CLASS
Indicates the number of blank lines to place in an empty
(regular) class body.
|
static int |
BLANKLINES_EMPTY_METHOD
Indicates the number of blank lines to place in an empty method body.
|
static int |
BLANKLINES_IMPORTS_AFTER
Indicates the number of blank lines after the import list, if
any.
|
static int |
BLANKLINES_PACKAGE_AFTER
Indicates the number of blank lines after the package
declaration, if any.
|
static int |
BLANKLINES_PRESERVE_COUNT
Indicates the number of blank lines to preserve if already
present.
|
static int |
CLONE_QUALIFIES_TYPES
Boolean property.
|
static int |
CUDDLE_EMPTY_BRACES
True cuddles (puts them next to each other) empty braces.
|
static java.lang.Boolean |
FALSE |
static java.lang.Integer |
IGNORED_I |
static java.lang.Boolean |
IGNORED_Z |
static int |
IMPORT_GROUP_IMPORTS
Boolean property.
|
static int |
IMPORT_GROUP_PACKAGE_DEPTH
Int property.
|
static int |
IMPORT_INNER_CLASS_NAME
Boolean property.
|
static int |
IMPORT_NARROW_MEMBERS_THRESHOLD
Int property.
|
static int |
IMPORT_NARROW_THRESHOLD
Int property.
|
static int |
INDENT_BLOCK_CHILDREN
True applies indent+1 to statements and declarations within a
block, except for switch labels (case/default).
|
static int |
INDENT_CLASS_MEMBERS
True applies indent+1 to declarations within a class body.
|
static int |
INDENT_CONTROL_BLOCKS
True applies indent+1 to block statements that are direct
children of control statements.
|
static int |
INDENT_NUM_SPACES
Int property.
|
static int |
INDENT_REPLACE_WITH_TABS
Boolean property.
|
static int |
INDENT_SWITCH_CASES
True applies indent+1 for switch labels (case/default).
|
static int |
INDENT_TAB_SIZE
Int property.
|
static int |
INDENT_TRAILING_COMMENTS
Determines how much to indent trailing comments.
|
static java.lang.Integer |
INTEGER_ALWAYS_WRAP
Integer value for always-wrap.
|
static java.lang.Integer |
INTEGER_NEVER_WRAP
Integer value for never-wrap.
|
static java.lang.Integer |
INTEGER_WRAP_IF_LONG
Integer value for wrap-if-long.
|
static int |
MEMBER_ORDER
HashStructure property.
|
static int |
NEWLINE_AFTER_SWITCH_CASE
True puts a newline after a switch case label ("case" or
"default") if there is no open-brace.
|
static int |
NEWLINE_ANONYMOUS_CLASS_BRACES
True puts an anonymous class brace on a new line.
|
static int |
NEWLINE_ARRAY_BRACES
True starts array constant braces on a newline.
|
static int |
NEWLINE_BLOCK_BRACES
This setting used to determine the open brace position of all blocks.
|
static int |
NEWLINE_CASE_BRACES
True puts a case brace on a new line.
|
static int |
NEWLINE_CATCH
True starts "catch" (of a try statement) on a newline.
|
static int |
NEWLINE_CATCH_BRACES
True puts a catch brace on a new line.
|
static int |
NEWLINE_CLASS_BRACES
True starts class body braces on a newline.
|
static int |
NEWLINE_DO_BRACES
True puts a do brace on a new line.
|
static int |
NEWLINE_ELSE
True starts "else" (of an if statement) on a newline.
|
static int |
NEWLINE_ELSE_BRACES
True puts an else brace on a new line.
|
static int |
NEWLINE_EXTENDS
True starts an extends clause on a newline.
|
static int |
NEWLINE_FINALLY
True starts "finally" (of a try statement) on a newline.
|
static int |
NEWLINE_FINALLY_BRACES
True puts a finally brace on a new line.
|
static int |
NEWLINE_FOR_BRACES
True puts a for brace on a new line.
|
static int |
NEWLINE_IF_BRACES
True puts an if brace on a new line.
|
static int |
NEWLINE_IMPLEMENTS
True starts a implements clause on a newline.
|
static int |
NEWLINE_METHOD_BRACES
True starts method/constructor body braces on a newline.
|
static int |
NEWLINE_STATIC_INITIALIZER_BRACES
True puts a static initializer brace on a new line.
|
static int |
NEWLINE_SWITCH_BRACES
True puts a switch brace on a new line.
|
static int |
NEWLINE_SYNCHRONIZED_BRACES
True puts a synchronized brace on a new line.
|
static int |
NEWLINE_THROWS
True starts a throws clause on a newline.
|
static int |
NEWLINE_TRY_BRACES
True puts a try brace on a new line.
|
static int |
NEWLINE_WHILE
True starts "while" (of a do statement) on a newline.
|
static int |
NEWLINE_WHILE_BRACES
True puts a while brace on a new line.
|
static java.lang.Integer |
ONE |
static int |
PREFERENCES_base |
static java.lang.Object[] |
PREFERENCES_defaults
Default values to use for each preference.
|
static java.lang.String[] |
PREFERENCES_explanations |
static java.lang.String[] |
PREFERENCES_keys
Hash keys for each preference.
|
static int |
PREFERENCES_max |
static java.lang.Object[] |
PREFERENCES_sun
Code Conventions for the Java(TM) Programming Language.
|
static int |
SPACE_ARGUMENTS_BEFORE
True means put a space between the name and the argument list
(method calls and creator expressions).
|
static int |
SPACE_ASSIGN_AROUND
True means put a space before and after an assign operator.
|
static int |
SPACE_BINARYOP_AROUND
True means put a space before and after any other binary operator
not previously covered.
|
static int |
SPACE_BRACES_AROUND
Deprecated.
|
static int |
SPACE_BRACKETS_WITHIN
True means put a space after an open-bracket and before a
close-bracket.
|
static int |
SPACE_COLON_AFTER
True means put a space after a colon.
|
static int |
SPACE_COLON_BEFORE
True means put a space before a colon.
|
static int |
SPACE_COMMA_AFTER
True means put a space after commas.
|
static int |
SPACE_COMMA_BEFORE
True means put a space before commas.
|
static int |
SPACE_KEYWORD_AFTER
True means put a space after the following keywords: catch, do,
for, if, switch, synchronized, while.
|
static int |
SPACE_LAMBDA_OPERATOR_AROUND
True means put a space around the '->' lambda operator.
|
static int |
SPACE_OPENBRACE_BEFORE
True means put a space before an open-brace.
|
static int |
SPACE_PARAMETERS_BEFORE
True means put a space between the name and the formal parameter
list (method and constructor declarations).
|
static int |
SPACE_PARENS_WITHIN
True means put a space after an open-paren and before a
close-paren.
|
static int |
SPACE_QUESTION_AFTER
True means put a space after a question mark.
|
static int |
SPACE_QUESTION_BEFORE
True means put a space before a question mark.
|
static int |
SPACE_SEMICOLON_AFTER
True means put a space after semi-colons.
|
static int |
SPACE_SEMICOLON_BEFORE
True means put a space before semi-colons.
|
static int |
SPACE_TYPECAST_AFTER
True means put a space after a typecast.
|
static int |
TRI_ALWAYS_WRAP
Tri-state value for always-wrap.
|
static int |
TRI_NEVER_WRAP
Tri-state value for never-wrap.
|
static int |
TRI_WRAP_IF_LONG
Tri-state value for wrap-if-long.
|
static java.lang.Boolean |
TRUE |
static java.lang.Integer |
TWO |
static java.lang.Integer |
UNKNOWN_I |
static java.lang.Boolean |
UNKNOWN_Z |
static int |
WRAP_ALIGN
Boolean property.
|
static int |
WRAP_ANNOTATIONS
Determines wrapping of an annotation with arguments.
|
static int |
WRAP_ANONYMOUS_CLASS_ASSIGNMENTS
Determines wrapping of an assignment where the right hand side
is a new anonymous class expression.
|
static int |
WRAP_ARRAY_CONSTANT
Applies to array constants.
|
static int |
WRAP_ASSERT_OPERATORS
Determines wrapping after assert colon operators.
|
static int |
WRAP_BEFORE_OPERATORS
Determines if wrapping should occur before or after operators.
|
static int |
WRAP_BEFORE_TERNARY_OPERATORS
Determines if wrapping should occur before or after ternary operators.
|
static int |
WRAP_BINARY_OPERATOR
Applies to binary operators and assignment operators.
|
static int |
WRAP_CLASS_ANNOTATIONS
Deprecated.
Use WRAP_ANNOTATIONS or WRAP_MARKER_ANNOTATIONS instead
|
static int |
WRAP_DOT_CHAIN
Applies to successive method calls and dot dereferences, also
known as "dot chains".
|
static int |
WRAP_EXTENDS
Applies to extends clauses.
|
static int |
WRAP_FIELD_ANNOTATIONS
Deprecated.
Use WRAP_ANNOTATIONS or WRAP_MARKER_ANNOTATIONS instead
|
static int |
WRAP_FOR_STATEMENT
Applies to for statements.
|
static int |
WRAP_IMPLEMENTS
Determines wrapping of implements types.
|
static int |
WRAP_INVOKE_ARGUMENTS
Applies to class creators, method calls, and constructor
invocations.
|
static int |
WRAP_LINE_WIDTH
Int property that states the line width.
|
static int |
WRAP_LOCAL_VARIABLE_ANNOTATIONS
Deprecated.
Use WRAP_ANNOTATIONS or WRAP_MARKER_ANNOTATIONS instead
|
static int |
WRAP_MARKER_ANNOTATIONS
Determines wrapping of a marker annotation.
|
static int |
WRAP_METHOD_ANNOTATIONS
Deprecated.
Use WRAP_ANNOTATIONS or WRAP_MARKER_ANNOTATIONS instead
|
static int |
WRAP_MODIFIERS
Applies to modifiers and annotations.
|
static int |
WRAP_PARAMETER_ANNOTATIONS
Determines wrapping of a parameter annotation.
|
static int |
WRAP_PARAMETER_LIST
Applies to method/constructor formal parameter lists.
|
static int |
WRAP_QUES_OPERATOR
Applies to "x? x: x" operators.
|
static int |
WRAP_STRING_EOL_CONCATENATIONS
Determines if wrapping should occur after each String ending in EOL
in String concatenations.
|
static int |
WRAP_THROWS
Applies to throws clauses.
|
static int |
WRAP_TYPE_ANNOTATIONS
Determines wrapping of type annotations.
|
static java.lang.Integer |
ZERO |
static final java.lang.Boolean TRUE
static final java.lang.Boolean FALSE
static final java.lang.Integer ZERO
static final java.lang.Integer ONE
static final java.lang.Integer TWO
static final java.lang.Boolean IGNORED_Z
static final java.lang.Integer IGNORED_I
static final java.lang.Boolean UNKNOWN_Z
static final java.lang.Integer UNKNOWN_I
static final int PREFERENCES_base
static final int INDENT_NUM_SPACES
class C { int method() { System.out.println(); } }If NUM_SPACES == 4, then:
class C { int method() { System.out.println(); } }
static final int INDENT_REPLACE_WITH_TABS
static final int INDENT_TAB_SIZE
static final int INDENT_CLASS_MEMBERS
class C { int field = 0; }If indentClassMembers == true, then:
class C { int field = 0; }
static final int INDENT_BLOCK_CHILDREN
{ System.out.println(); }If indentBlockChildren == true, then:
{ System.outprintln(); }
static final int INDENT_CONTROL_BLOCKS
while ( true ) System.out.println(1); // indent not changed if ( true ) { System.out.println(2); } else { System.out.println(3); }If indentControlBlocks == true, then:
while ( true ) System.out.println(1); // indent not changed if ( true ) { System.out.println(2); } else { System.out.println(3); }
static final int INDENT_SWITCH_CASES
switch (value) { case 0: System.out.println(); break; }If indentSwitchCase == true && indentBlockChildren == true, then:
switch (value) { case 0: System.out.println(); break; }
static final int BLANKLINES_PRESERVE_COUNT
// Notice there are 2 blank lines. class C { }If blanklinesPreserveCount == 0 && blanklinesEmptyClass == 0, then
// No blank lines. class C { }If blanklinesPreserveCount == 1, then
// Up to 1 blank lines was preserved. class C { }If blanklinesPreserveCount == 2, then
// Up to 2 blank lines was preserved. class C { }
static final int BLANKLINES_PACKAGE_AFTER
static final int BLANKLINES_IMPORTS_AFTER
static final int BLANKLINES_BEFORE_FIRST_CLASS
static final int BLANKLINES_BEFORE_FIRST_MEMBER
static final int BLANKLINES_AFTER_LAST_MEMBER
static final int BLANKLINES_BEFORE_DOC_COMMENT
static final int BLANKLINES_BEFORE_FIELD
static final int BLANKLINES_BEFORE_METHOD
static final int BLANKLINES_BEFORE_MEMBER_CLASS
static final int BLANKLINES_EMPTY_CLASS
class {}If blanklinesEmptyClass == 0 && newlineClassBraces == true, then:
class { }If blanklinesEmptyClass == 1 && newlineClassBraces == true, then:
class { }
static final int BLANKLINES_EMPTY_ANONYMOUS
new Object() {};If blanklinesEmptyAnonymous == 0 && newlineClassBraces == true, then:
new Object() { };If blanklinesEmptyAnonymous == 1 && newlineClassBraces == true, then:
new Object() { };
static final int BLANKLINES_EMPTY_METHOD
void m() {}If blanklinesEmptyMethod == 0 && newlineMethodBraces == true, then:
void m() { }If blanklinesEmptyMethod == 1 && newlineMethodBraces == true, then:
void m() { }
static final int BLANKLINES_EMPTY_BLOCK
{}If blanklinesEmptyBlock == 1 && newlineBlockBraces == true, then:
{ }
static final int NEWLINE_CLASS_BRACES
class C { }If newlineClassBraces == true, then:
class C { }
static final int NEWLINE_METHOD_BRACES
void m() { }If newlineMethodBraces == true, then:
void m() { }
static final int NEWLINE_BLOCK_BRACES
static final int NEWLINE_ARRAY_BRACES
final String[] values = { "a", "b", "c", };If newlineArrayBraces == true, then:
final String[] values = { "a", "b", "c", };
static final int NEWLINE_AFTER_SWITCH_CASE
case 0: break;If newlineAfterSwitchCase == false, then:
case 0: break;
static final int NEWLINE_EXTENDS
class C extends S { }If newlineExtends == true, then:
class C extends S { }
static final int NEWLINE_IMPLEMENTS
class C implements I { }If newlineImplements == true, then:
class C implements I { }
static final int NEWLINE_THROWS
public void m() throws E;If newlineThrows == true, then:
public void m() throws E;
static final int NEWLINE_ELSE
if ( true ) { } else { }If newlineElse == true && newlineBlockBraces == false, then:
if ( true ) { } else { }If newlineElse == false && newlineBlockBraces == true, then:
if ( true ) { } else { }If newlineElse == true && newlineBlockBraces == true, then:
if ( true ) { } else { }
static final int NEWLINE_WHILE
do { } while ( true );if newlineWhile == true && newlineBlockBraces == true, then:
do { } while ( true );
static final int NEWLINE_CATCH
try { } catch ( Exception e ) { }if newlineCatch == true && newlineBlockBraces == true, then:
try { } catch ( Exception e ) { }
static final int NEWLINE_FINALLY
try { } finally { }If newlineFinally == true && newlineBlockBraces == true, then:
try { } finally { }
static final int SPACE_COMMA_BEFORE
static final int SPACE_COMMA_AFTER
static final int SPACE_SEMICOLON_BEFORE
static final int SPACE_SEMICOLON_AFTER
static final int SPACE_QUESTION_BEFORE
static final int SPACE_QUESTION_AFTER
static final int SPACE_COLON_BEFORE
static final int SPACE_COLON_AFTER
static final int SPACE_TYPECAST_AFTER
static final int SPACE_ARGUMENTS_BEFORE
static final int SPACE_PARAMETERS_BEFORE
static final int SPACE_KEYWORD_AFTER
static final int SPACE_ASSIGN_AROUND
= += -= *= /= %= &= |= ^= <<= >>= >>>=
static final int SPACE_BINARYOP_AROUND
== != < <= > >= + - * / % && || & | ^ << >> >>>Note that the assign operators ignore this setting.
static final int SPACE_PARENS_WITHIN
static final int SPACE_BRACKETS_WITHIN
static final int SPACE_OPENBRACE_BEFORE
static final int TRI_NEVER_WRAP
static final int TRI_WRAP_IF_LONG
static final int TRI_ALWAYS_WRAP
static final java.lang.Integer INTEGER_NEVER_WRAP
static final java.lang.Integer INTEGER_WRAP_IF_LONG
static final java.lang.Integer INTEGER_ALWAYS_WRAP
static final int WRAP_LINE_WIDTH
static final int WRAP_ALIGN
static final int WRAP_MODIFIERS
@Annotate1 @Annotate2( arg1, arg2 ) publicIf wrap-if-long, then:
@Annotate1 @Annotate2( arg1, arg2 ) publicIf always-wrap, then:
@Annotate1 @Annotate2 public
static final int WRAP_EXTENDS
extends T1, T2, T3, T4If wrap-if-long, then:
extends T1, T2, T3, T4,If always-wrap, then:
extends T1, T2, T3, T4, T5, T6
static final int WRAP_THROWS
throws T1, T2, T3, T4If wrap-if-long, then:
throws T1, T2, T3, T4,If always-wrap, then:
throws T1, T2, T3, T4, T5, T6
static final int WRAP_PARAMETER_LIST
abstract void m( int param1, int param2, int param3 );If wrap-if-long, then:
abstract void m( int param1, int param2, int param3 );If always-wrap, then:
abstract void m( int param1, int param2, int param3 );
static final int WRAP_DOT_CHAIN
a().b().c().d(); a.b.c.d;If wrap-if-long, then:
a().b() .c().d(); a.b .c.d;If always-wrap, then:
a() .b() .c() .d(); a .b .c .d;
static final int WRAP_FOR_STATEMENT
for ( int i = 0; i < N; i++ )If wrap-if-long, then:
for ( int i = 0; i < N; i++ )If always-wrap, then:
for ( int i = 0; i < N; i++ )
static final int WRAP_BINARY_OPERATOR
static final int WRAP_QUES_OPERATOR
x? x: x;If wrap-if-long, then:
x? x: x;If always-wrap, then:
x? x: x;
static final int WRAP_ARRAY_CONSTANT
static final int WRAP_INVOKE_ARGUMENTS
invoke( a, b, c, d );If wrap-if-long, then:
invoke( a, b, c, d );If always-wrap, then:
invoke( a, b, c, d );
static final int IMPORT_GROUP_IMPORTS
import java.io.File; import java.lang.reflect.Modifier; // Same package imports grouped together. import java.util.Map; import java.util.ArrayList;If importGroupImports == false, then:
import java.io.File; import java.lang.reflect.Modifier; import java.util.Map; import java.util.ArrayList;
static final int IMPORT_GROUP_PACKAGE_DEPTH
// Different packages, but they all start with "java". import java.lang.String; import java.lang.reflect.Modifier; import java.util.Map; import java.util.ArrayList;If importGroupPackageDepth == 2, then:
// Different packages, but they both start with "java.lang". import java.lang.String; import java.lang.reflect.Modifier; import java.util.Map; import java.util.ArrayList;If importGroupPackageDepth == 3, then:
import java.lang.String; import java.lang.reflect.Modifier; import java.util.Map; import java.util.ArrayList;
static final int IMPORT_INNER_CLASS_NAME
import java.util.Map.Entry; Entry e;If importInnerClassName == false, then:
import java.util.Map; Map.Entry e;
static final int IMPORT_NARROW_THRESHOLD
import java.util.List; import javax.swing.JPanel; import javax.swing.JTree;If importNarrowThreshold == 2, then:
import java.util.List; // At 2 imports, we change from narrow imports to wide imports. import javax.swing.*;If importNarrowThreshold == 1 || importNarrowThreshold == 0, then:
import java.util.*; import javax.swing.*;If importNarrowThreshold == -1, then:
import java.util.List; import javax.swing.JPanel; import javax.swing.JTree;
static final int IMPORT_NARROW_MEMBERS_THRESHOLD
static final int CLONE_QUALIFIES_TYPES
import java.util.List; class Source { List f; }The cloned field will be inserted into the class body of this destination class.
class Destination { }The example shows what the destination class will look like after the clone is inserted into it. If cloneQualifiesTypes == false,
class Destination { // The type reference was cloned verbatim during cloneSelf(S). List f; }If cloneQualifiesTypes == true,
class Destination { // The type reference was fully qualified during cloneSelf(S). java.util.List f; }
static final int MEMBER_ORDER
JavaPreferences.MemberOrder
.static final int NEWLINE_SWITCH_BRACES
static final int NEWLINE_FOR_BRACES
static final int NEWLINE_IF_BRACES
static final int NEWLINE_ELSE_BRACES
static final int NEWLINE_SYNCHRONIZED_BRACES
static final int NEWLINE_TRY_BRACES
static final int NEWLINE_CATCH_BRACES
static final int NEWLINE_DO_BRACES
static final int NEWLINE_WHILE_BRACES
static final int NEWLINE_FINALLY_BRACES
static final int NEWLINE_ANONYMOUS_CLASS_BRACES
static final int CUDDLE_EMPTY_BRACES
static final int ALIGN_ANONYMOUS_CLASS
static final int ALIGN_VARIABLE_NAMES
static final int WRAP_ANONYMOUS_CLASS_ASSIGNMENTS
@Deprecated static final int WRAP_CLASS_ANNOTATIONS
@Deprecated static final int WRAP_METHOD_ANNOTATIONS
@Deprecated static final int WRAP_FIELD_ANNOTATIONS
static final int WRAP_PARAMETER_ANNOTATIONS
@Deprecated static final int WRAP_LOCAL_VARIABLE_ANNOTATIONS
static final int WRAP_ANNOTATIONS
static final int WRAP_MARKER_ANNOTATIONS
static final int WRAP_TYPE_ANNOTATIONS
static final int WRAP_BEFORE_OPERATORS
static final int INDENT_TRAILING_COMMENTS
static final int WRAP_BEFORE_TERNARY_OPERATORS
static final int WRAP_IMPLEMENTS
static final int ALIGN_ARRAY_INITIALIZERS
static final int NEWLINE_CASE_BRACES
static final int NEWLINE_STATIC_INITIALIZER_BRACES
static final int WRAP_ASSERT_OPERATORS
static final int WRAP_STRING_EOL_CONCATENATIONS
static final int SPACE_LAMBDA_OPERATOR_AROUND
static final int PREFERENCES_max
static final int SPACE_BRACES_AROUND
static final java.lang.String[] PREFERENCES_keys
static final java.lang.String[] PREFERENCES_explanations
static final java.lang.Object[] PREFERENCES_defaults
static final java.lang.Object[] PREFERENCES_sun