|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.toplink.tools.refactoring.CodingStandard
Purpose: Describe the purpose of the Class.
Responsibilities:
Constructor Summary |
CodingStandard()
|
Method Summary |
Type | Method |
---|---|
void |
accessingClassAttributes()
First of all, we should not access variables directly in the methods. |
void |
blankLines()
A blank line should always be used in the following circumstances: - between logical sections inside a method - to improve readability - between the method comment and the method declaration |
void |
blankSpaces()
Blank spaces should always be used in the following circumstances: - A keyword followed by a parenthesis should be separated by a space: while (true) { ... |
void |
booleanVariable()
A boolean variable should always be prefixed with conjunctions like is, has, does, should, etc. |
void |
declarationsInTheMethod(java.lang.String firstArgument,
java.lang.String secondArgument)
It's a good idea to declare all the varibles at the beginning of a code block as variables defined in the middle of the block can be confusing. |
void |
forStatements()
Never break for-statements into multiple lines. |
void |
ifElseStatements()
Always use the braces {}. |
void |
longStatements()
Avoid long statements. |
void |
methodBody()
NOTE: A compound statement is a statement that contains several other statements enclosed in braces "{}". |
java.lang.String |
methodCommentsForUserAPI(java.lang.String argument1,
java.lang.String argument2)
PUBLIC: Give a full description of the user callable method. |
void |
methodDeclarationIsLong(java.lang.String argument1,
java.lang.String argument2)
method comments |
void |
methodDeclarationIsReallyLong(java.lang.String argument1,
java.lang.String argument2,
java.lang.String argument3,
java.lang.String ifYouHaveMoreArgumentsThenCheckYourMethod)
method Comments |
void |
setAccessor(java.lang.String useTabsToIndentVariable)
Instead of prefixing the parameter "useTabsToIndentVariable" with an article (e.g. |
void |
toplinkExceptions()
TopLink exceptions are all runtime exceptions - so they do not have to be caught. |
void |
tryCatchStatements()
|
void |
whileStatements()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CodingStandard()
Method Detail |
public void accessingClassAttributes()
public void blankLines()
public void blankSpaces()
public void booleanVariable()
public void declarationsInTheMethod(java.lang.String firstArgument, java.lang.String secondArgument)
public void forStatements()
public void ifElseStatements()
public void longStatements()
public void methodBody()
public java.lang.String methodCommentsForUserAPI(java.lang.String argument1, java.lang.String argument2) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
argument1
- This is optional, give full description only if neccessary.java.lang.reflect.InvocationTargetException
- This is optional, give full description only if neccessary.public void methodDeclarationIsLong(java.lang.String argument1, java.lang.String argument2) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
public void methodDeclarationIsReallyLong(java.lang.String argument1, java.lang.String argument2, java.lang.String argument3, java.lang.String ifYouHaveMoreArgumentsThenCheckYourMethod) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
public void setAccessor(java.lang.String useTabsToIndentVariable)
public void toplinkExceptions() throws DatabaseException, QueryException
public void tryCatchStatements()
public void whileStatements()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |