Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.parser.java.v2
Interface JavaPreferences

All Known Subinterfaces:
JavaConstants
All Known Implementing Classes:
AbstractAnnotation, AbstractClass, AbstractElement, AbstractField, AbstractMethod, AbstractPackage, AbstractType, AbstractVariable, AnnotationFilter, BaseFileProvider.BaseClass, BaseFileProvider.BasePackage, BindingRegistry, CallerContext, CastedMethod, ClassHierarchy, oracle.javatools.parser.java.v2.classfile.ClClass, CommonUtilities, Conversions, oracle.javatools.parser.java.v2.internal.InternalUtilities, LexerLiteral, LexerUtilities, MethodHierarchy, NullProvider, PrimitiveType, QuickComponent, QuickHasName, QuickHasType, QuickLocalVariable, QuickMethod, QuickSignatureParser, SignatureHasType, SignatureParser, SimplifyTypeHelper, SourceFactory, SourcePreferences, SourceVisitor, oracle.javatools.parser.java.v2.internal.symbol.Sym.SymTraversal, oracle.javatools.parser.java.v2.internal.symbol.SymUtilities, Value, WrapperClass, WrapperField, WrapperLocalVariable, WrapperMethod, WrapperPackage

public interface JavaPreferences

Constants for source preferences, mostly formatting preferences.


Nested Class Summary
static interface JavaPreferences.MemberOrder
          Defines keys within the member order hash structure.

 

Field Summary
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 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 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").
static int NEWLINE_ARRAY_BRACES
          True starts array constant braces on a newline.
static int NEWLINE_BLOCK_BRACES
          True starts code braces on a newline.
static int NEWLINE_CATCH
          True starts "catch" (of a try statement) on a newline.
static int NEWLINE_CLASS_BRACES
          True starts class body braces on a newline.
static int NEWLINE_ELSE
          True starts "else" (of an if statement) on a newline.
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_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_THROWS
          True starts a throws clause on a newline.
static int NEWLINE_WHILE
          True starts "while" (of a do statement) on a newline.
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_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
           
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_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_ARRAY_CONSTANT
          Applies to array constants.
static int WRAP_BINARY_OPERATOR
          Applies to binary operators and assignment operators.
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 and implements clauses.
static int WRAP_FOR_STATEMENT
          Applies to for statements.
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_MODIFIERS
          Applies to modifiers and annotations.
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_THROWS
          Applies to throws clauses.
static java.lang.Integer ZERO
           

 

Field Detail

TRUE

static final java.lang.Boolean TRUE

FALSE

static final java.lang.Boolean FALSE

ZERO

static final java.lang.Integer ZERO

ONE

static final java.lang.Integer ONE

TWO

static final java.lang.Integer TWO

IGNORED_Z

static final java.lang.Boolean IGNORED_Z

IGNORED_I

static final java.lang.Integer IGNORED_I

UNKNOWN_Z

static final java.lang.Boolean UNKNOWN_Z

UNKNOWN_I

static final java.lang.Integer UNKNOWN_I

PREFERENCES_base

static final int PREFERENCES_base
See Also:
Constant Field Values

INDENT_NUM_SPACES

static final int INDENT_NUM_SPACES
Int property. X indicates how many spaces make up a single indent level.

If NUM_SPACES == 2, then:

   class C
   {
     int method()
     {
       System.out.println();
     }
   }
 
If NUM_SPACES == 4, then:
   class C
   {
       int method()
       {
           System.out.println();
       }
   }
 
See Also:
Constant Field Values

INDENT_REPLACE_WITH_TABS

static final int INDENT_REPLACE_WITH_TABS
Boolean property. True means to replace (a line's) leading spaces with '\t'. The TAB_SIZE setting indicates how many spaces composes a '\t'. Ignores if TAB_SIZE <= 0.
See Also:
Constant Field Values

INDENT_TAB_SIZE

static final int INDENT_TAB_SIZE
Int property. X indicates how many spaces make up one tab ('\t'). Ignored if REPLACE_WITH_TABS == false.
See Also:
Constant Field Values

INDENT_CLASS_MEMBERS

static final int INDENT_CLASS_MEMBERS
True applies indent+1 to declarations within a class body.

If indentClassMembers == false, then:

   class C
   {
   int field = 0;
   }
 
If indentClassMembers == true, then:
   class C
   {
     int field = 0;
   }
 
See Also:
Constant Field Values

INDENT_BLOCK_CHILDREN

static final int INDENT_BLOCK_CHILDREN
True applies indent+1 to statements and declarations within a block, except for switch labels (case/default).

If indentBlockChildren == false, then:

   {
   System.out.println();
   }
 
If indentBlockChildren == true, then:
   {
     System.outprintln();
   }
 
See Also:
Constant Field Values

INDENT_CONTROL_BLOCKS

static final int INDENT_CONTROL_BLOCKS
True applies indent+1 to block statements that are direct children of control statements. "Control statement" includes: do, for, if, switch, synchronized, try, while. This setting is ignored if newlineBlockBraces == false. This setting is ignored if the child is a regular statement rather than a block statement.

If indentControlBlocks == false, then:

   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);
     }
 
See Also:
Constant Field Values

INDENT_SWITCH_CASES

static final int INDENT_SWITCH_CASES
True applies indent+1 for switch labels (case/default).

If indentSwitchCase == false && indentBlockChildren == true, then:

   switch (value)
   {
   case 0:
     System.out.println();
     break;
   }
 
If indentSwitchCase == true && indentBlockChildren == true, then:
   switch (value)
   {
     case 0:
       System.out.println();
       break;
   }
 
See Also:
Constant Field Values

BLANKLINES_PRESERVE_COUNT

static final int BLANKLINES_PRESERVE_COUNT
Indicates the number of blank lines to preserve if already present. 0 means never preserve blank lines. X means preserve up to X blank lines if present.

Here's the input text.

   // 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
   {


   }
 
See Also:
Constant Field Values

BLANKLINES_PACKAGE_AFTER

static final int BLANKLINES_PACKAGE_AFTER
Indicates the number of blank lines after the package declaration, if any. Setting is ignored if there is no package declaration.
See Also:
Constant Field Values

BLANKLINES_IMPORTS_AFTER

static final int BLANKLINES_IMPORTS_AFTER
Indicates the number of blank lines after the import list, if any. Setting is ignored if there are no imports.
See Also:
Constant Field Values

BLANKLINES_BEFORE_FIRST_CLASS

static final int BLANKLINES_BEFORE_FIRST_CLASS
Indicates the number of blank lines before the class declaration (i.e. before the doc comment, annotations, and modifiers). If there is nothing before the first class (i.e. the file starts with a class declaration), then this setting is ignored. If there are imports, this means blank lines between the last import and the first class. If there are is a package declaration but no imports, this means blank lines between package declaration and the first class.
See Also:
Constant Field Values

BLANKLINES_BEFORE_FIRST_MEMBER

static final int BLANKLINES_BEFORE_FIRST_MEMBER
Indicates the number of blank lines before the first child in a class body, including comments.
See Also:
Constant Field Values

BLANKLINES_AFTER_LAST_MEMBER

static final int BLANKLINES_AFTER_LAST_MEMBER
Indicates the number of blank lines after the last child in a class body, including comments.
See Also:
Constant Field Values

BLANKLINES_BEFORE_DOC_COMMENT

static final int BLANKLINES_BEFORE_DOC_COMMENT
Indicates the number of blank lines before a doc comment that documents a class or a class member.
See Also:
Constant Field Values

BLANKLINES_BEFORE_FIELD

static final int BLANKLINES_BEFORE_FIELD
Indicates the number of blank lines before a field declaration.
See Also:
Constant Field Values

BLANKLINES_BEFORE_METHOD

static final int BLANKLINES_BEFORE_METHOD
Indicates the number of blank lines before a method declaration.
See Also:
Constant Field Values

BLANKLINES_BEFORE_MEMBER_CLASS

static final int BLANKLINES_BEFORE_MEMBER_CLASS
Indicates the number of blank lines before a member type declaration.
See Also:
Constant Field Values

BLANKLINES_EMPTY_CLASS

static final int BLANKLINES_EMPTY_CLASS
Indicates the number of blank lines to place in an empty (regular) class body.

If blanklinesEmptyClass == -1 && newlineClassBraces == true, then:

   class
   {}
 
If blanklinesEmptyClass == 0 && newlineClassBraces == true, then:
   class
   {
   }
 
If blanklinesEmptyClass == 1 && newlineClassBraces == true, then:
   class
   {
   }
 
See Also:
Constant Field Values

BLANKLINES_EMPTY_ANONYMOUS

static final int BLANKLINES_EMPTY_ANONYMOUS
Indicates the number of blank lines to place in an empty anonymous class body.

If blanklinesEmptyAnonymous == -1 && newlineClassBraces == true, then:

   new Object()
   {};
 
If blanklinesEmptyAnonymous == 0 && newlineClassBraces == true, then:
   new Object()
   {
   };
 
If blanklinesEmptyAnonymous == 1 && newlineClassBraces == true, then:
   new Object()
   {
   };
 
See Also:
Constant Field Values

BLANKLINES_EMPTY_METHOD

static final int BLANKLINES_EMPTY_METHOD
Indicates the number of blank lines to place in an empty method body.

If blanklinesEmptyMethod == -1 && newlineMethodBraces == true, then:

   void m()
   {}
 
If blanklinesEmptyMethod == 0 && newlineMethodBraces == true, then:
   void m()
   {
   }
 
If blanklinesEmptyMethod == 1 && newlineMethodBraces == true, then:
   void m()
   {

   }
 
See Also:
Constant Field Values

BLANKLINES_EMPTY_BLOCK

static final int BLANKLINES_EMPTY_BLOCK
Indicates the number of blank lines to place in an empty code block.

If blanklinesEmptyBlock == 0 && newlineBlockBraces == true, then:

   {}
 
If blanklinesEmptyBlock == 1 && newlineBlockBraces == true, then:
   {
   }
 
See Also:
Constant Field Values

NEWLINE_CLASS_BRACES

static final int NEWLINE_CLASS_BRACES
True starts class body braces on a newline.

If newlineClassBraces == false, then:

   class C {
   }
 
If newlineClassBraces == true, then:
   class C
   {
   }
 
See Also:
Constant Field Values

NEWLINE_METHOD_BRACES

static final int NEWLINE_METHOD_BRACES
True starts method/constructor body braces on a newline.

If newlineMethodBraces == false, then:

   void m() {
   }
 
If newlineMethodBraces == true, then:
   void m()
   {
   }
 
See Also:
Constant Field Values

NEWLINE_BLOCK_BRACES

static final int NEWLINE_BLOCK_BRACES
True starts code braces on a newline. This affects how block statements appear as children of control statements. A standalone block statement (except in the special case of switch case labels) ignores this setting because standalone statements implicitly are started on a newline.

If newlineBlockBraces == false, then:

   if ( true ) {
     System.out.println();
   }
 
If newlineBlockBraces == true, then:
   if ( true )
   {
     System.out.println();
   }
 
See Also:
Constant Field Values

NEWLINE_ARRAY_BRACES

static final int NEWLINE_ARRAY_BRACES
True starts array constant braces on a newline.

If newlineArrayBraces == false, then:

   final String[] values = {
     "a", "b", "c",
   };
 
If newlineArrayBraces == true, then:
   final String[] values =
   {
     "a", "b", "c",
   };
 
See Also:
Constant Field Values

NEWLINE_AFTER_SWITCH_CASE

static final int NEWLINE_AFTER_SWITCH_CASE
True puts a newline after a switch case label ("case" or "default"). If there is an open-brace immediately after the case label, then this setting overrides NEWLINE_BLOCK_BRACES.

If newlineAfterSwitchCase == true, then:

   case 0:
     {
       break;
     }
 
If newlineAfterSwitchCase == false, then:
   case 0: {
       break;
     }
 
See Also:
Constant Field Values

NEWLINE_EXTENDS

static final int NEWLINE_EXTENDS
True starts an extends clause on a newline.

If newlineExtends == false, then:

   class C extends S
   {
   }
 
If newlineExtends == true, then:
   class C
     extends S
   {
   }
 
See Also:
Constant Field Values

NEWLINE_IMPLEMENTS

static final int NEWLINE_IMPLEMENTS
True starts a implements clause on a newline.

If newlineImplements == false, then:

   class C implements I
   {
   }
 
If newlineImplements == true, then:
   class C
     implements I
   {
   }
 
See Also:
Constant Field Values

NEWLINE_THROWS

static final int NEWLINE_THROWS
True starts a throws clause on a newline.

If newlineThrows == false, then:

   public void m() throws E;
 
If newlineThrows == true, then:
   public void m()
     throws E;
 
See Also:
Constant Field Values

NEWLINE_ELSE

static final int NEWLINE_ELSE
True starts "else" (of an if statement) on a newline.

If newlineElse == false && newlineBlockBraces == false, then:

   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
   {
   }
 
See Also:
Constant Field Values

NEWLINE_WHILE

static final int NEWLINE_WHILE
True starts "while" (of a do statement) on a newline.

If newlineWhile == false && newlineBlockBraces == true, then:

   do
   {
   } while ( true );
 
if newlineWhile == true && newlineBlockBraces == true, then:
   do
   {
   }
   while ( true );
 
See Also:
Constant Field Values

NEWLINE_CATCH

static final int NEWLINE_CATCH
True starts "catch" (of a try statement) on a newline.

If newlineCatch == false && newlineBlockBraces == true, then:

   try
   {
   } catch ( Exception e )
   {
   }
 
if newlineCatch == true && newlineBlockBraces == true, then:
   try
   {
   }
   catch ( Exception e )
   {
   }
 
See Also:
Constant Field Values

NEWLINE_FINALLY

static final int NEWLINE_FINALLY
True starts "finally" (of a try statement) on a newline.

If newlineFinally == false && newlineBlockBraces == true, then:

   try
   {
   } finally
   {
   }
 
If newlineFinally == true && newlineBlockBraces == true, then:
   try
   {
   }
   finally
   {
   }
 
See Also:
Constant Field Values

SPACE_COMMA_BEFORE

static final int SPACE_COMMA_BEFORE
True means put a space before commas.
See Also:
Constant Field Values

SPACE_COMMA_AFTER

static final int SPACE_COMMA_AFTER
True means put a space after commas.
See Also:
Constant Field Values

SPACE_SEMICOLON_BEFORE

static final int SPACE_SEMICOLON_BEFORE
True means put a space before semi-colons.
See Also:
Constant Field Values

SPACE_SEMICOLON_AFTER

static final int SPACE_SEMICOLON_AFTER
True means put a space after semi-colons. Usually, this will only apply to for statements.
See Also:
Constant Field Values

SPACE_QUESTION_BEFORE

static final int SPACE_QUESTION_BEFORE
True means put a space before a question mark.
See Also:
Constant Field Values

SPACE_QUESTION_AFTER

static final int SPACE_QUESTION_AFTER
True means put a space after a question mark.
See Also:
Constant Field Values

SPACE_COLON_BEFORE

static final int SPACE_COLON_BEFORE
True means put a space before a colon. Colons appear in the question operator and in enhanced for loops.
See Also:
Constant Field Values

SPACE_COLON_AFTER

static final int SPACE_COLON_AFTER
True means put a space after a colon. Colons appear in the question operator and in enhanced for loops.
See Also:
Constant Field Values

SPACE_TYPECAST_AFTER

static final int SPACE_TYPECAST_AFTER
True means put a space after a typecast.
See Also:
Constant Field Values

SPACE_ARGUMENTS_BEFORE

static final int SPACE_ARGUMENTS_BEFORE
True means put a space between the name and the argument list (method calls and creator expressions).
See Also:
Constant Field Values

SPACE_PARAMETERS_BEFORE

static final int SPACE_PARAMETERS_BEFORE
True means put a space between the name and the formal parameter list (method and constructor declarations). Setting is ignored for catch clause parameter declarations.
See Also:
Constant Field Values

SPACE_KEYWORD_AFTER

static final int SPACE_KEYWORD_AFTER
True means put a space after the following keywords: catch, do, for, if, switch, synchronized, while. Think of it as applying to any keyword that is followed by an open paren or open brace.
See Also:
Constant Field Values

SPACE_ASSIGN_AROUND

static final int SPACE_ASSIGN_AROUND
True means put a space before and after an assign operator. The assign operators are:
   = += -= *= /= %= &= |= ^= <<= >>= >>>=
 
See Also:
Constant Field Values

SPACE_BINARYOP_AROUND

static final int SPACE_BINARYOP_AROUND
True means put a space before and after any other binary operator not previously covered. The binary operators are:
   == != < <= > >= + - * / % && || & | ^ << >> >>>
 
Note that the assign operators ignore this setting.
See Also:
Constant Field Values

SPACE_PARENS_WITHIN

static final int SPACE_PARENS_WITHIN
True means put a space after an open-paren and before a close-paren. This can happen in formal parameter lists and argument lists and control statement conditions. Setting is ignored for empty parens.
See Also:
Constant Field Values

SPACE_BRACKETS_WITHIN

static final int SPACE_BRACKETS_WITHIN
True means put a space after an open-bracket and before a close-bracket. This can happen in array creators. Setting is ignored for empty brackets.
See Also:
Constant Field Values

SPACE_OPENBRACE_BEFORE

static final int SPACE_OPENBRACE_BEFORE
True means put a space before an open-brace. Typically, this applies to things like class braces, method braces, and control block braces.
See Also:
Constant Field Values

TRI_NEVER_WRAP

static final int TRI_NEVER_WRAP
Tri-state value for never-wrap.
See Also:
Constant Field Values

TRI_WRAP_IF_LONG

static final int TRI_WRAP_IF_LONG
Tri-state value for wrap-if-long.
See Also:
Constant Field Values

TRI_ALWAYS_WRAP

static final int TRI_ALWAYS_WRAP
Tri-state value for always-wrap.
See Also:
Constant Field Values

INTEGER_NEVER_WRAP

static final java.lang.Integer INTEGER_NEVER_WRAP
Integer value for never-wrap.

INTEGER_WRAP_IF_LONG

static final java.lang.Integer INTEGER_WRAP_IF_LONG
Integer value for wrap-if-long.

INTEGER_ALWAYS_WRAP

static final java.lang.Integer INTEGER_ALWAYS_WRAP
Integer value for always-wrap.

WRAP_LINE_WIDTH

static final int WRAP_LINE_WIDTH
Int property that states the line width. The formatter will try to wrap lines that exceed this width.
See Also:
Constant Field Values

WRAP_ALIGN

static final int WRAP_ALIGN
Boolean property. True means wrapped lines are aligned with the first element. False means wrapped lines are indented.
See Also:
Constant Field Values

WRAP_MODIFIERS

static final int WRAP_MODIFIERS
Applies to modifiers and annotations. Wrapping may occurs after an annotation.

If never-wrap, then:


See Also:
Constant Field Values


WRAP_EXTENDS

static final int WRAP_EXTENDS
Applies to extends and implements clauses. Wrapping may occur after a comma.

If never-wrap, then:

   extends T1, T2, T3, T4
 
If wrap-if-long, then:
   extends T1, T2,
           T3, T4,
 
If always-wrap, then:
   extends T1,
           T2,
           T3,
           T4,
           T5,
           T6
 
See Also:
Constant Field Values

WRAP_THROWS

static final int WRAP_THROWS
Applies to throws clauses. Wrapping may occur after a comma.

If never-wrap, then:

   throws T1, T2, T3, T4
 
If wrap-if-long, then:
   throws T1, T2,
          T3, T4,
 
If always-wrap, then:
   throws T1,
          T2,
          T3,
          T4,
          T5,
          T6
 
See Also:
Constant Field Values

WRAP_PARAMETER_LIST

static final int WRAP_PARAMETER_LIST
Applies to method/constructor formal parameter lists. Wrapping may occur after a comma.

If never-wrap, then:

   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 );
 
See Also:
Constant Field Values

WRAP_DOT_CHAIN

static final int WRAP_DOT_CHAIN
Applies to successive method calls and dot dereferences, also known as "dot chains". Wrapping may occur before a dot.

If never-wrap, then:

   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;
 
See Also:
Constant Field Values

WRAP_FOR_STATEMENT

static final int WRAP_FOR_STATEMENT
Applies to for statements. Wrapping may occur after a semicolons.

If never-wrap, then:

   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++ )
 
See Also:
Constant Field Values

WRAP_BINARY_OPERATOR

static final int WRAP_BINARY_OPERATOR
Applies to binary operators and assignment operators. Wrapping may occur after a binary operator.
See Also:
Constant Field Values

WRAP_QUES_OPERATOR

static final int WRAP_QUES_OPERATOR
Applies to "x? x: x" operators. Wrapping may occur after the question and also after the colon.

If never-wrap, then:

   x? x: x;
 
If wrap-if-long, then:
   x? x:
      x;
 
If always-wrap, then:
   x?
     x:
     x;
 
See Also:
Constant Field Values

WRAP_ARRAY_CONSTANT

static final int WRAP_ARRAY_CONSTANT
Applies to array constants. Wrapping may occur after a comma.
See Also:
Constant Field Values

WRAP_INVOKE_ARGUMENTS

static final int WRAP_INVOKE_ARGUMENTS
Applies to class creators, method calls, and constructor invocations. Wrapping may occur after a comma.

If never-wrap, then:

   invoke( a, b, c, d );
 
If wrap-if-long, then:
   invoke( a, b, c,
           d );
 
If always-wrap, then:
   invoke( a,
           b,
           c,
           d );
 
See Also:
Constant Field Values

IMPORT_GROUP_IMPORTS

static final int IMPORT_GROUP_IMPORTS
Boolean property. True means to group imports together by package (extra blank line between groups) when sorting imports.

If importGroupImports == true && importGroupPackageDepth == 0, then:

   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;
 
See Also:
Constant Field Values

IMPORT_GROUP_PACKAGE_DEPTH

static final int IMPORT_GROUP_PACKAGE_DEPTH
Int property. 0 means don't collapse adjacent groups. X means collapse adjacent groups of imports if the first X names match. Ignored if importGroupImports == false.

If importGroupPackageDepth == 1, then:

   // 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;
 
See Also:
Constant Field Values

IMPORT_INNER_CLASS_NAME

static final int IMPORT_INNER_CLASS_NAME
Boolean property. Applies when shortening fully qualified class name references. True says to import the inner class name and shorten the fully qualified reference to a simple name. False says to import the outer class name and shorten the fully qualified reference to start with the outer class.

If importInnerClassName == true, then:

   import java.util.Map.Entry;

     Entry e;
 
If importInnerClassName == false, then:
   import java.util.Map;

     Map.Entry e;
 
See Also:
Constant Field Values

IMPORT_NARROW_THRESHOLD

static final int IMPORT_NARROW_THRESHOLD
Int property. Applies when adding import declarations for types. -1 means always import using a narrow import. 0 or 1 means always import using a wide import. X means import using narrow imports until there are <X imports from a single package and then wide imports thereafter.

If importNarrowThreshold == 3, then:

   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;
 
See Also:
Constant Field Values

IMPORT_NARROW_MEMBERS_THRESHOLD

static final int IMPORT_NARROW_MEMBERS_THRESHOLD
Int property. Applies when adding import declarations for members. -1 means always import using a narrow import. 0 or 1 means always import using a wide import. X means import using narrow imports until there are <X imports from a single package and then wide imports thereafter.

The mechanism is similar as the IMPORT_NARROW_THRESHOLD, but this is for imported members rather than types.

See Also:
Constant Field Values

CLONE_QUALIFIES_TYPES

static final int CLONE_QUALIFIES_TYPES
Boolean property. This is NOT a user-defined preference. True tells the parser to fully qualify cloned type references. False tells the parser to clone verbatim.

In the examples, we are cloning the field "f" from this source class.

   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;
   }
 
See Also:
Constant Field Values

MEMBER_ORDER

static final int MEMBER_ORDER
HashStructure property. The hash structure's keys are documented by JavaPreferences.MemberOrder.
See Also:
Constant Field Values

PREFERENCES_max

static final int PREFERENCES_max
See Also:
Constant Field Values

SPACE_BRACES_AROUND

static final int SPACE_BRACES_AROUND
See Also:
Constant Field Values

PREFERENCES_keys

static final java.lang.String[] PREFERENCES_keys
Hash keys for each preference.

PREFERENCES_defaults

static final java.lang.Object[] PREFERENCES_defaults
Default values to use for each preference. (debugging)

PREFERENCES_sun

static final java.lang.Object[] PREFERENCES_sun
Code Conventions for the Java(TM) Programming Language. http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.