Package gudusoft.gsqlparser.pp.processor
Class ProcessorFactory
Object
gudusoft.gsqlparser.pp.processor.ProcessorFactory
a formattor para processor factory used for create the processor instance
- Author:
- zhoujun
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendNewLineAfterAndBeforeReverseKeyWordProcessor(GFmtOpt option, boolean inNewLine, String startKeyword, String endKeyword) create the keyword in new line processorappendNewLineAfterReverseKeyWordProcessor(GFmtOpt option, boolean isItemInNewLine, String keyword) create the new line processor for item liststatic voidstatic <E extends AbstractProcessor>
Ecreate a instancestatic AlignAliasProcessorcreateAlignAliasProcessor(GFmtOpt option, boolean option2, TAlignStyle style) create the alias processorcreateAlterTableOptionAlignProcessor(GFmtOpt option, boolean inNewLine) create the processor used to append an new line after the table namecreateAppendNewLineBeforeKeyWordProcessor(GFmtOpt option, boolean inNewLine, String keyword, boolean completely) createAppendNewLineBeforeReverseKeyWordProcessor(GFmtOpt option, boolean inNewLine, String keyword) create the processor used to append new line before the keywordstatic AbstractProcessor<TBlockSqlStatement>static CapitalisationProcessorcreateCapitalisationProcessor(GFmtOpt option) create the processor used to capitalize the textstatic CaseWhenProcessorcreateCaseWhenProcessor(GFmtOpt option, Boolean caseWhenThenInSameLine, Integer indentCaseFromSwitch) create the processor used to process the 'case when' paramtersstatic ColumnlistCommaProcessorcreateColumnlistCommaProcessor(GFmtOpt option, TLinefeedsCommaOption commaOption, TAlignStyle option2) create the comma processorcreateCreateFuncFirstParamInNewlineProcessor(GFmtOpt opt, Boolean beStyleFunctionFirstParamInNewline) static CreateFuncLeftBEProcessorcreateCreateFuncLeftBEProcessor(GFmtOpt opt, Boolean beStyleFunctionLeftBEOnNewline, Integer beStyleFunctionLeftBEIndentSize) static CreateFuncRightBEProcessorcreateCreateFuncRightBEProcessor(GFmtOpt opt, Boolean beStyleFunctionRightBEOnNewline, Integer beStyleFunctionRightBEIndentSize) createCreateTableBEInNewLineProcessor(GFmtOpt option, Boolean leftBEOnNewline, Boolean rightBeOnNewline, Boolean itemListInNewLine) create the processor used to insert new line after the parenthesiscreateCreateTableItemAlignProcessor(GFmtOpt option, TAlignOption alignOption) create the processor used to align the itemsstatic CreateViewReturnProcessorstatic CTEProcessorcreateCTEProcessor(GFmtOpt option, Boolean cteNewlineBeforeAs) static DeclareVarItemAlignProcessorused to align the variable namesstatic DeleteKeyWordAlignProcessorcreate the processor used to align the keywords in the delete statementstatic DistinctKeyWordProcessorcreateDistinctKeyWordProcessor(GFmtOpt option, boolean isTreatDistinctAsVirtualColumn) create the distinct keyword processorstatic ExecParaNewLineProcessorcreateExecParaNewLineProcessor(GFmtOpt opt, Boolean linebreakBeforeParamInExec) static ExpressionProcessorcreateExpressionProcessor(GFmtOpt option) create the expression processor for all statementsstatic ExpressionProcessorcreateExpressionProcessor(GFmtOpt option, Boolean isAndUnderWhere) static IfStmtBEProcessorstatic InsertKeyWordAlignProcessorcreate the processor used to align the keywords in insert statementstatic InsertOutputClauseProcessorcreate the processor used to adjust the left parenthesisstatic JoinOnProcessorcreateJoinOnProcessor(GFmtOpt option, boolean selectFromclauseJoinOnInNewline, boolean alignJoinWithFromKeyword) create the join on processor for the select statementstatic MergeKeyWordAlignProcessorstatic MergeWhenClauseProcessorstatic AbstractProcessor<TIfStmt>static ReturnStmtProcessorstatic SelectKeyWordAlignProcessorcreate the processor used to align the keywords in select statementstatic AbstractProcessor<TStatementList>createStmtListProcessor(GFmtOpt opt, String alignKeyword) static UnionProcessorcreateUnionProcessor(GFmtOpt option) create the union processor for the select statementstatic UpdateKeyWordAlignProcessorcreate the processor used to align the keywords in the update statementstatic <E extends AbstractProcessor>
EnewInstance(Class<E> type) create a new processor instance
-
Constructor Details
-
ProcessorFactory
public ProcessorFactory()
-
-
Method Details
-
createColumnlistCommaProcessor
public static ColumnlistCommaProcessor createColumnlistCommaProcessor(GFmtOpt option, TLinefeedsCommaOption commaOption, TAlignStyle option2) create the comma processor- Parameters:
option-- Returns:
- instance
-
createAlignAliasProcessor
public static AlignAliasProcessor createAlignAliasProcessor(GFmtOpt option, boolean option2, TAlignStyle style) create the alias processor- Parameters:
option-- Returns:
- instance
-
appendNewLineAfterReverseKeyWordProcessor
public static AppendNewLineAfterReverseKeyWordProcessor appendNewLineAfterReverseKeyWordProcessor(GFmtOpt option, boolean isItemInNewLine, String keyword) create the new line processor for item list- Parameters:
option-- Returns:
-
createDistinctKeyWordProcessor
public static DistinctKeyWordProcessor createDistinctKeyWordProcessor(GFmtOpt option, boolean isTreatDistinctAsVirtualColumn) create the distinct keyword processor- Parameters:
isTreatDistinctAsVirtualColumn-- Returns:
-
appendNewLineAfterAndBeforeReverseKeyWordProcessor
public static AppendNewLineAfterAndBeforeReverseKeyWordProcessor appendNewLineAfterAndBeforeReverseKeyWordProcessor(GFmtOpt option, boolean inNewLine, String startKeyword, String endKeyword) create the keyword in new line processor- Parameters:
inNewLine-- Returns:
-
createJoinOnProcessor
public static JoinOnProcessor createJoinOnProcessor(GFmtOpt option, boolean selectFromclauseJoinOnInNewline, boolean alignJoinWithFromKeyword) create the join on processor for the select statement- Parameters:
selectFromclauseJoinOnInNewline-- Returns:
-
createUnionProcessor
create the union processor for the select statement- Parameters:
option-- Returns:
-
createExpressionProcessor
create the expression processor for all statements- Parameters:
option-- Returns:
-
createExpressionProcessor
public static ExpressionProcessor createExpressionProcessor(GFmtOpt option, Boolean isAndUnderWhere) -
createCaseWhenProcessor
public static CaseWhenProcessor createCaseWhenProcessor(GFmtOpt option, Boolean caseWhenThenInSameLine, Integer indentCaseFromSwitch) create the processor used to process the 'case when' paramters- Parameters:
option-caseWhenThenInSameLine-indentCaseFromSwitch-- Returns:
-
createSelectKeyWordAlignProcessor
create the processor used to align the keywords in select statement- Parameters:
option-- Returns:
-
createMergeKeyWordAlignProcessor
-
createInsertKeyWordAlignProcessor
create the processor used to align the keywords in insert statement- Parameters:
option-- Returns:
-
createAppendLineAfterInsertTableNameProcessor
public static AppendLineAfterInsertTableNameProcessor createAppendLineAfterInsertTableNameProcessor(GFmtOpt option) create the processor used to append an new line after the table name- Parameters:
option-- Returns:
-
createAppendLineAfterMergeTableNameProcessor
public static AppendLineAfterMergeTableNameProcessor createAppendLineAfterMergeTableNameProcessor(GFmtOpt option) -
createMergeWhenClauseProcessor
-
createCapitalisationProcessor
create the processor used to capitalize the text- Parameters:
option-- Returns:
-
createAppendNewLineBeforeReverseKeyWordProcessor
public static AppendNewLineBeforeReverseKeyWordProcessor createAppendNewLineBeforeReverseKeyWordProcessor(GFmtOpt option, boolean inNewLine, String keyword) create the processor used to append new line before the keyword- Parameters:
option-keyword-- Returns:
-
createInsertValuesParenthsesAdjustProcessor
public static InsertValuesParenthsesAdjustProcessor createInsertValuesParenthsesAdjustProcessor(GFmtOpt option) create the processor used to adjust the left parenthesis- Parameters:
option-- Returns:
-
createDeleteKeyWordAlignProcessor
create the processor used to align the keywords in the delete statement- Parameters:
option-- Returns:
-
createUpdateKeyWordAlignProcessor
create the processor used to align the keywords in the update statement- Parameters:
option-- Returns:
-
createCreateTableBEInNewLineProcessor
public static CreateTableBEInNewLineProcessor createCreateTableBEInNewLineProcessor(GFmtOpt option, Boolean leftBEOnNewline, Boolean rightBeOnNewline, Boolean itemListInNewLine) create the processor used to insert new line after the parenthesis- Parameters:
option-leftBEOnNewline-rightBeOnNewline-- Returns:
-
createCreateTableItemAlignProcessor
public static CreateTableItemAlignProcessor createCreateTableItemAlignProcessor(GFmtOpt option, TAlignOption alignOption) create the processor used to align the items- Parameters:
option-alignOption-- Returns:
-
createCTEProcessor
-
createDeclareVarItemAlignProcessor
used to align the variable names- Parameters:
option-- Returns:
-
createCreateTableConstraintAlignProcessor
public static CreateTableConstraintAlignProcessor createCreateTableConstraintAlignProcessor(GFmtOpt option) -
createCombineWhitespaceAndClearReturnProcessor
-
createInsertOutputClauseProcessor
-
createExecParaNewLineProcessor
public static ExecParaNewLineProcessor createExecParaNewLineProcessor(GFmtOpt opt, Boolean linebreakBeforeParamInExec) -
createCreateFuncLeftBEProcessor
public static CreateFuncLeftBEProcessor createCreateFuncLeftBEProcessor(GFmtOpt opt, Boolean beStyleFunctionLeftBEOnNewline, Integer beStyleFunctionLeftBEIndentSize) -
createCreateFuncRightBEProcessor
public static CreateFuncRightBEProcessor createCreateFuncRightBEProcessor(GFmtOpt opt, Boolean beStyleFunctionRightBEOnNewline, Integer beStyleFunctionRightBEIndentSize) -
createCreateFuncFirstParamInNewlineProcessor
public static CreateFuncFirstParamInNewlineProcessor createCreateFuncFirstParamInNewlineProcessor(GFmtOpt opt, Boolean beStyleFunctionFirstParamInNewline) -
createCreateFuncReturnsTableProcessor
-
createCreateFuncWSPaddingParenthesesProcessor
-
createIfStmtBEProcessor
-
createReturnStmtProcessor
-
createCreateViewReturnProcessor
-
createAlterTableOptionAlignProcessor
public static AlterTableOptionItemAlignProcessor createAlterTableOptionAlignProcessor(GFmtOpt option, boolean inNewLine) -
createAppendNewLineBeforeKeyWordProcessor
public static AppendNewLineBeforeKeyWordProcessor createAppendNewLineBeforeKeyWordProcessor(GFmtOpt option, boolean inNewLine, String keyword, boolean completely) -
create
public static <E extends AbstractProcessor> E create(Class<E> type, GFmtOpt option, Object... parameters) create a instance- Parameters:
type-- Returns:
-
newInstance
create a new processor instance- Parameters:
type- the processor type- Returns:
- insteance
-
clear
-
createStmtListProcessor
public static AbstractProcessor<TStatementList> createStmtListProcessor(GFmtOpt opt, String alignKeyword) -
createBeginAndEndProcessor
-
createPlsqlIfStmtBEProcessor
-