|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CodingStyleOptions
A set of Coding Style options and convenience methods for using those options.
CodingStyleManager#getCodingStyleOptions(oracle.ide.addin.Context)
Field Summary | |
---|---|
static int |
BRACE_POSITION_NEXT_LINE Indicates that the brace should appear on next line after the declaration. |
static int |
BRACE_POSITION_SAME_LINE Indicates that the brace should appear on the same line as the declaration. |
static int |
MEMBER_CLASS Constant used to get the member order for an inner class. |
static int |
MEMBER_CONSTRUCTOR Constant used to get the member order for a constructor. |
static int |
MEMBER_FIELD_PACKAGE Constant used to get the member order for a package private field. |
static int |
MEMBER_FIELD_PACKAGE_STATIC Constant used to get the member order for a package private static field. |
static int |
MEMBER_FIELD_PRIVATE Constant used to get the member order for a private field. |
static int |
MEMBER_FIELD_PRIVATE_STATIC Constant used to get the member order for a private static field. |
static int |
MEMBER_FIELD_PROTECTED Constant used to get the member order for a protected field. |
static int |
MEMBER_FIELD_PROTECTED_STATIC Constant used to get the member order for a protected static field. |
static int |
MEMBER_FIELD_PUBLIC Constant used to get the member order for a public field. |
static int |
MEMBER_FIELD_PUBLIC_STATIC Constant used to get the member order for a public static field. |
static int |
MEMBER_METHOD Constant used to get the member order for a method. |
static int |
WRAP_ALWAYS Indicates that elements should always be wrapped. |
static int |
WRAP_IF_LONG Indicates that elements exceeding the line width should be wrapped. |
static int |
WRAP_NEVER Indicates that all elements should appear on the same line. |
Method Summary | |
---|---|
void |
addCodingStyleOptionsListener(CodingStyleOptionsListener listener) Add a listener for changes to these options. |
java.lang.String |
format(java.lang.String input) Convenience method to format the given string according to these options. |
int |
getArrayBracePosition() Determines where the opening brace following an array declaration should appear. |
int |
getBlanklinesAfterImports() Determines the number of blank lines after the import list in a class. |
int |
getBlanklinesAfterLastMember() Determines the number of blank lines after the last member in a class. |
int |
getBlanklinesBeforeField() Determines the number of blank lines before a field declaration. |
int |
getBlanklinesBeforeFirstClass() Determines the number of blank lines before the first class declaration. |
int |
getBlanklinesBeforeFirstMember() Determines the number of blank lines before the first member in a class. |
int |
getBlanklinesBeforeMemberClass() Determines the number of blank lines before a member class. |
int |
getBlanklinesBeforeMethod() Determines the number of blank lines before a method declaration. |
int |
getBlanklinesEmptyAnonymous() Determines the number of blank lines to be placed in an empty anonymous class body. |
int |
getBlanklinesEmptyBlock() Determines the number of blank lines to be placed in an empty block. |
int |
getBlanklinesEmptyClass() Determines the number of blank lines to be placed in an emtpy class body. |
int |
getBlanklinesEmptyMethod() Determines the number of blank lines to be placed in an empty method. |
int |
getBlanklinesPreserved() Determines the number of blank lines that will be preserved if already present. |
int |
getBlockBracePosition() Determines where the opening brace for a control statement block should appear. |
int |
getClassBracePosition() Determines where the opening brace following a class declaration should appear. |
java.lang.String |
getFieldName(java.lang.String base) Convenience method to get a field name that obeys the naming conventions specified in these options. |
java.lang.String |
getFieldPrefix() Determines the prefix for fields. |
java.lang.String |
getFieldSuffix() Determines the suffix for fields. |
boolean |
getGroupImports() Determines whether imports will be grouped. |
int |
getGroupPackageDepth() Determines the number of common packages that will cause similar import statements to be grouped. |
boolean |
getImportInnerClasses() Determines whether inner classes are imported, or only their parent class. |
boolean |
getIndentBlockChildren() Determines whether block children should be indented. |
char[] |
getIndentChars(int level) Convenience method to get an array of characters to use for the given indention level. |
boolean |
getIndentClassMembers() Determines whether class members should be indented. |
boolean |
getIndentControlBlocks() Determines whether control blocks should be indented. |
boolean |
getIndentReplaceWithTabs() Determines whether leading spaces in a line should be replaced with tab characters. |
int |
getIndentSize() Determines how many spaces are used for each indention level. |
boolean |
getIndentSwitchCases() Determines whether switch cases should be indented. |
java.lang.String |
getLocalVariableName(java.lang.String base) Convenience method to get a local variable name that obeys the naming conventions specified in these options. |
java.lang.String |
getLocalVariablePrefix() Determines the local variable prefix. |
java.lang.String |
getLocalVariableSuffix() Determines the local variable suffix. |
byte |
getMemberOrder(int member) Get the relative order of the given Java member. |
int |
getMethodBracePosition() Determines where the opening brace following a method declaration should appear. |
boolean |
getNewlineCatch() Determines whether a catch should appear on a new line. |
boolean |
getNewlineElse() Determines whether an else clause should be placed on a new line. |
boolean |
getNewlineExtends() Determines whether an extends clause should be placed on a new line. |
boolean |
getNewlineFinally() Determines whether a finally should appear on a new line. |
boolean |
getNewlineImplements() Determines whether an implements clause should be placed on a new line. |
boolean |
getNewlineThrows() Determines whether a throws clause should be placed on a new line. |
boolean |
getNewlineWhile() Determines whether a while statement in a do-while should be placed on a new line. |
java.lang.String |
getParameterName(java.lang.String base) Convenience method to get a parameter name that obeys the naming conventions specified in these options. |
java.lang.String |
getParameterPrefix() Determines the prefix for parameters. |
java.lang.String |
getParameterSuffix() Determines the suffix for parameters. |
SourcePreferences |
getSourcePreferences() Get a SourcePreferences object configured with these options. |
boolean |
getSpaceAfterColon() Determines whether a space should be placed after the colon in a ternary expression or enhanced for loop. |
boolean |
getSpaceAfterComma() Determines whether a space should be placed after a comma. |
boolean |
getSpaceAfterKeyword() Determines whether a space should be placed between a keyword an opening brace or parenthesis. |
boolean |
getSpaceAfterQuestion() Determines whether a space should be placed after a question mark. |
boolean |
getSpaceAfterSemicolon() Determines whether a space should be placed after a semicolon. |
boolean |
getSpaceAfterTypecast() Determines whether a space should be placed after a typecast. |
boolean |
getSpaceAroundAssignment() Determines whether spaces should be placed before and after assigment operators. |
boolean |
getSpaceAroundBinaryOperator() Determines whether spaces should be placed before and after binary operators. |
boolean |
getSpaceBeforeArguments() Determines whether a space should be placed before an argument list. |
boolean |
getSpaceBeforeColon() Determines whether a space should be placed before the colon in a ternary expression or enhanced for loop. |
boolean |
getSpaceBeforeComma() Determines whether a space should be placed before a comma. |
boolean |
getSpaceBeforeOpenBrace() Determines whether a space should be placed before an open brace. |
boolean |
getSpaceBeforeParameters() Determines whether a space should be placed before a parameter list. |
boolean |
getSpaceBeforeQuestion() Determines whether a space should be placed before a question mark. |
boolean |
getSpaceBeforeSemicolon() Determines whether a space should be placed before a semicolon. |
boolean |
getSpaceWithinBrackets() Determines whether a space should be placed after an open bracket and before a close bracket. |
boolean |
getSpaceWithinParenthesis() Determines whether a space should be placed after an open parenthesis and before a close parenthesis. |
java.lang.String |
getStaticFieldName(java.lang.String base) Convenience method to get a static field name that obeys the naming conventions specified in these options. |
java.lang.String |
getStaticFieldPrefix() Determines the prefix for static fields. |
java.lang.String |
getStaticFieldSuffix() Determines the suffix for static fields. |
int |
getSwitchCaseBracePosition() Determines where the opening brace following a switch case should appear. |
int |
getTabSize() Get the number of spaces that will be replaced with a tab. |
boolean |
getUseWideImports() Determines whether wide imports are used. |
boolean |
getUseWideMemberImports() Determines whether wide static imports are used. |
int |
getWideImportMemberThreshold() Determines the number of members that must be imported from a given class before a wide import (.*) is used. |
int |
getWideImportThreshold() Determines the number of classes that must be imported from a given package before a wide import (.*) is used. |
boolean |
getWrapAlign() Determines whether to align wrapped lines with the first element. |
int |
getWrapArrayConstant() Determines the wrapping for array constants. |
int |
getWrapBinaryOperator() Determines the wrapping for binary and assigment operators. |
int |
getWrapDotChain() Determines the wrapping for method calls and dot references. |
int |
getWrapExtends() Determines the wrapping for extends and implements clauses. |
int |
getWrapForStatement() Determines the wrapping for for statements. |
int |
getWrapInvokeArguments() Determines the wrapping for argument lists. |
int |
getWrapLineWidth() Determines the width of a line, after which the line will be wrapped. |
int |
getWrapModifiers() Determines the wrapping for modifiers and annotations. |
int |
getWrapParameterList() Determines the wrapping for parameter lists. |
int |
getWrapTernaryExpression() Determines the wrapping for ternary expressions. |
int |
getWrapThrows() Determines the wrapping for throws clauses. |
void |
removeCodingStyleOptionsListener(CodingStyleOptionsListener listener) Add a listener for changes to these options. |
Field Detail |
---|
static final int BRACE_POSITION_SAME_LINE
static final int BRACE_POSITION_NEXT_LINE
static final int WRAP_NEVER
static final int WRAP_IF_LONG
static final int WRAP_ALWAYS
static final int MEMBER_FIELD_PUBLIC_STATIC
static final int MEMBER_FIELD_PROTECTED_STATIC
static final int MEMBER_FIELD_PACKAGE_STATIC
static final int MEMBER_FIELD_PRIVATE_STATIC
static final int MEMBER_FIELD_PUBLIC
static final int MEMBER_FIELD_PROTECTED
static final int MEMBER_FIELD_PACKAGE
static final int MEMBER_FIELD_PRIVATE
static final int MEMBER_CONSTRUCTOR
static final int MEMBER_METHOD
static final int MEMBER_CLASS
Method Detail |
---|
void addCodingStyleOptionsListener(CodingStyleOptionsListener listener)
listener
- listener to be addedvoid removeCodingStyleOptionsListener(CodingStyleOptionsListener listener)
listener
- listener to be addedSourcePreferences getSourcePreferences()
SourcePreferences
object configured with these options.int getIndentSize()
boolean getIndentReplaceWithTabs()
getTabSize()
will determine how many spaces are replaced with tab.true
if spaces should be replaced with tabs, false
otherwiseint getTabSize()
getIndentReplaceWithTabs()
returns true
.boolean getIndentClassMembers()
true
if class members should be indented, false
otherwiseboolean getIndentControlBlocks()
true
if control blocks should be indented, false
otherwiseboolean getIndentBlockChildren()
true
if block children should be indented, false
otherwiseboolean getIndentSwitchCases()
true
if switch cases should be indented, false
otherwiseint getBlanklinesPreserved()
int getBlanklinesAfterImports()
int getBlanklinesBeforeFirstClass()
int getBlanklinesBeforeFirstMember()
int getBlanklinesAfterLastMember()
int getBlanklinesBeforeField()
int getBlanklinesBeforeMethod()
int getBlanklinesBeforeMemberClass()
int getBlanklinesEmptyClass()
int getBlanklinesEmptyAnonymous()
int getBlanklinesEmptyMethod()
int getBlanklinesEmptyBlock()
boolean getNewlineExtends()
true
if an extends clause should appear on a new line, false
otherwiseboolean getNewlineImplements()
true
if an implements clause should appear on a new line, false
otherwiseboolean getNewlineThrows()
true
if a throws clause should appear on a new line, false
otherwiseboolean getNewlineElse()
true
if an else clause should appear on a new line, false
otherwiseboolean getNewlineWhile()
true
if a while statement should appear on a new line, false
otherwiseboolean getNewlineCatch()
true
if a catch should appear on a new line, false
otherwiseboolean getNewlineFinally()
true
if a finally should appear on a new line, false
otherwiseboolean getSpaceBeforeComma()
true
if a space should be placed before a comma, false
otherwiseboolean getSpaceAfterComma()
true
if a space should be placed after a comma, false
otherwiseboolean getSpaceBeforeSemicolon()
true
if a space should be placed before a semicolon, false
otherwiseboolean getSpaceAfterSemicolon()
true
if a space should be placed after a semicolon, false
otherwiseboolean getSpaceBeforeQuestion()
true
if a space should be placed before a question mark, false
otherwiseboolean getSpaceAfterQuestion()
true
if a space should be placed after a question mark, false
otherwiseboolean getSpaceBeforeColon()
true
if a space should be placed before the colon in a ternary expression or enhanced for loop, false
otherwiseboolean getSpaceAfterColon()
true
if a space should be placed after the colon in a ternary expression or enhanced for loop, false
otherwiseboolean getSpaceAfterTypecast()
true
if a space should be placed after a typecast, false
otherwiseboolean getSpaceBeforeArguments()
true
if a space should be placed before an argument list, false
otherwiseboolean getSpaceBeforeParameters()
true
if a space should be placed before a parameter list, false
otherwiseboolean getSpaceAfterKeyword()
true
if a space should be placed before a keyword, false
otherwiseboolean getSpaceAroundAssignment()
= += -= *= /= %= &= |= ^= <<= >>= >>>=
true
if a space should be placed around assigment operators, false
otherwiseboolean getSpaceAroundBinaryOperator()
== != < <= > >= + - * / % && || & | ^ << >> >>>
true
if a space should be placed around binary operators, false
otherwiseboolean getSpaceWithinParenthesis()
true
if a space should be placed inside parenthesis, false
otherwiseboolean getSpaceWithinBrackets()
true
if a space should be placed inside brackets, false
otherwiseboolean getSpaceBeforeOpenBrace()
true
if a space should be placed before an open brace, false
otherwiseint getClassBracePosition()
BRACE_POSITION_SAME_LINE
and BRACE_POSITION_NEXT_LINE
.int getMethodBracePosition()
BRACE_POSITION_SAME_LINE
and BRACE_POSITION_NEXT_LINE
.int getBlockBracePosition()
BRACE_POSITION_SAME_LINE
and BRACE_POSITION_NEXT_LINE
.int getArrayBracePosition()
BRACE_POSITION_SAME_LINE
and BRACE_POSITION_NEXT_LINE
.int getSwitchCaseBracePosition()
BRACE_POSITION_SAME_LINE
and BRACE_POSITION_NEXT_LINE
.int getWrapLineWidth()
boolean getWrapAlign()
true
if wrapped lines should be aligned with the first element, false
if they should be indentedint getWrapModifiers()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapExtends()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapThrows()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapParameterList()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapDotChain()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapForStatement()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapBinaryOperator()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapTernaryExpression()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapArrayConstant()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.int getWrapInvokeArguments()
WRAP_ALWAYS
, WRAP_NEVER
, and WRAP_IF_LONG
.boolean getGroupImports()
true
if imports are grouped, false
otherwisegetGroupPackageDepth()
int getGroupPackageDepth()
boolean getImportInnerClasses()
true
if inner classes are imported, false
otherwiseboolean getUseWideImports()
getWideImportThreshold()
will determine how many narrow imports are allowed before a wide import is used.true
if wide imports are used, false
if all imports are narrow importsboolean getUseWideMemberImports()
getWideImportMemberThreshold()
will determine how many narrow static imports are allowed before a wide static import is used.true
if wide static imports are used, false
if all imports are narrow static importsint getWideImportThreshold()
getUseWideImports()
returns false
.int getWideImportMemberThreshold()
getUseWideImports()
returns false
.java.lang.String getFieldPrefix()
null
if not presentjava.lang.String getFieldSuffix()
null
if not presentjava.lang.String getStaticFieldPrefix()
null
if not presentjava.lang.String getStaticFieldSuffix()
null
if not presentjava.lang.String getParameterPrefix()
null
if not presentjava.lang.String getParameterSuffix()
null
if not presentjava.lang.String getLocalVariablePrefix()
null
if not presentjava.lang.String getLocalVariableSuffix()
null
if not presentchar[] getIndentChars(int level)
getIndentSize()
, getIndentReplaceWithTabs()
, getTabSize()
java.lang.String format(java.lang.String input)
input
- the input stringjava.lang.String getFieldName(java.lang.String base)
base
- the base namejava.lang.String getStaticFieldName(java.lang.String base)
base
- the base namejava.lang.String getParameterName(java.lang.String base)
base
- the base namejava.lang.String getLocalVariableName(java.lang.String base)
base
- the base namebyte getMemberOrder(int member)
member
- the Java memberMEMBER_FIELD_PUBLIC_STATIC
, MEMBER_FIELD_PROTECTED_STATIC
, MEMBER_FIELD_PACKAGE_STATIC
, MEMBER_FIELD_PRIVATE_STATIC
, MEMBER_FIELD_PUBLIC
, MEMBER_FIELD_PROTECTED
, MEMBER_FIELD_PACKAGE
, MEMBER_FIELD_PRIVATE
, MEMBER_CONSTRUCTOR
, MEMBER_METHOD
, MEMBER_CLASS
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |