Klasse CodeFormatter
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.formatter.old.CodeFormatter
- Alle implementierten Schnittstellen:
ICodeFormatter
,TerminalTokens
Veraltet.
How to format a piece of code ?
- Create an instance of
CodeFormatter
- Use the method
void format(aString)
on this instance to formataString
. It will return the formatted string.
-
Feldübersicht
Von Schnittstelle geerbte Felder org.aspectj.org.eclipse.jdt.internal.compiler.parser.TerminalTokens
TokenNameabstract, TokenNameafter, TokenNameAND, TokenNameAND_AND, TokenNameAND_EQUAL, TokenNamearound, TokenNameARROW, TokenNameaspect, TokenNameassert, TokenNameAT, TokenNameAT308, TokenNameAT308DOTDOTDOT, TokenNamebefore, TokenNameBeginCaseElement, TokenNameBeginCaseExpr, TokenNameBeginIntersectionCast, TokenNameBeginLambda, TokenNameBeginRecordPattern, TokenNameBeginTypeArguments, TokenNameboolean, TokenNamebreak, TokenNamebyte, TokenNamecase, TokenNamecatch, TokenNamechar, TokenNameCharacterLiteral, TokenNameclass, TokenNameCOLON, TokenNameCOLON_COLON, TokenNameCOMMA, TokenNameCOMMENT_BLOCK, TokenNameCOMMENT_JAVADOC, TokenNameCOMMENT_LINE, TokenNameconst, TokenNamecontinue, TokenNamedeclare, TokenNamedefault, TokenNameDIVIDE, TokenNameDIVIDE_EQUAL, TokenNamedo, TokenNameDOT, TokenNamedouble, TokenNameDoubleLiteral, TokenNameElidedSemicolonAndRightBrace, TokenNameELLIPSIS, TokenNameelse, TokenNameenum, TokenNameEOF, TokenNameEQUAL, TokenNameEQUAL_EQUAL, TokenNameERROR, TokenNameexports, TokenNameextends, TokenNamefalse, TokenNamefinal, TokenNamefinally, TokenNamefloat, TokenNameFloatingPointLiteral, TokenNamefor, TokenNamegoto, TokenNameGREATER, TokenNameGREATER_EQUAL, TokenNameIdentifier, TokenNameif, TokenNameimplements, TokenNameimport, TokenNameinstanceof, TokenNameint, TokenNameIntegerLiteral, TokenNameinterface, TokenNameLBRACE, TokenNameLBRACKET, TokenNameLEFT_SHIFT, TokenNameLEFT_SHIFT_EQUAL, TokenNameLESS, TokenNameLESS_EQUAL, TokenNamelong, TokenNameLongLiteral, TokenNameLPAREN, TokenNameMINUS, TokenNameMINUS_EQUAL, TokenNameMINUS_MINUS, TokenNamemodule, TokenNameMULTIPLY, TokenNameMULTIPLY_EQUAL, TokenNamenative, TokenNamenew, TokenNamenon_sealed, TokenNameNOT, TokenNameNOT_EQUAL, TokenNameNotAToken, TokenNamenull, TokenNameopen, TokenNameopens, TokenNameOR, TokenNameOR_EQUAL, TokenNameOR_OR, TokenNamepackage, TokenNamePLUS, TokenNamePLUS_EQUAL, TokenNamePLUS_PLUS, TokenNamepointcut, TokenNameprivate, TokenNameprivileged, TokenNameprotected, TokenNameprovides, TokenNamepublic, TokenNameQUESTION, TokenNameRBRACE, TokenNameRBRACKET, TokenNameREMAINDER, TokenNameREMAINDER_EQUAL, TokenNamerequires, TokenNameRestrictedIdentifierpermits, TokenNameRestrictedIdentifierrecord, TokenNameRestrictedIdentifiersealed, TokenNameRestrictedIdentifierWhen, TokenNameRestrictedIdentifierYield, TokenNamereturn, TokenNameRIGHT_SHIFT, TokenNameRIGHT_SHIFT_EQUAL, TokenNameRPAREN, TokenNameSEMICOLON, TokenNameshort, TokenNameSingleQuoteStringLiteral, TokenNamestatic, TokenNamestrictfp, TokenNameStringLiteral, TokenNamesuper, TokenNameswitch, TokenNamesynchronized, TokenNameTextBlock, TokenNamethis, TokenNamethrow, TokenNamethrows, TokenNameto, TokenNametransient, TokenNametransitive, TokenNametrue, TokenNametry, TokenNameTWIDDLE, TokenNameUNSIGNED_RIGHT_SHIFT, TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL, TokenNameuses, TokenNamevoid, TokenNamevolatile, TokenNamewhile, TokenNameWHITESPACE, TokenNamewith, TokenNameXOR, TokenNameXOR_EQUAL
-
Konstruktorübersicht
-
Methodenübersicht
-
Konstruktordetails
-
CodeFormatter
Veraltet.
-
-
Methodendetails
-
format
Veraltet.Beschreibung aus Schnittstelle kopiert:ICodeFormatter
Formats the StringsourceString
, and returns a string containing the formatted version.- Angegeben von:
format
in SchnittstelleICodeFormatter
- Parameter:
string
- the string to formatindentLevel
- the initial indentation level, used to shift left/right the entire source fragment. An initial indentation level of zero has no effect.positions
- an array of positions to map. These are character-based source positions inside the original source, arranged in non-decreasing order, for which corresponding positions in the formatted source will be computed (so as to relocate elements associated with the original source). It updates the positions array with updated positions. If set tonull
, then no positions are mapped.lineSeparator
- the line separator to use in formatted source, if set tonull
, then the platform default one will be used.- Gibt zurück:
- the formatted output string.
-