Class SourceFileWriter
java.lang.Object
org.jboss.jdeparser.SourceFileWriter
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ImplJSourceFileprivate final CountingWriterprivate final FormatPreferencesprivate final StringBuilderprivate final Stringprivate final Indentprivate intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate final ListIterator<Indent> private Tokenprivate final ArrayDeque<AbstractJType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void(package private) voidvoidclose()voidflush()(package private) ImplJSourceFile(package private) int(package private) FormatPreferences(package private) intgetLine()(package private) TokengetState()(package private) AbstractJType(package private) voidnl()(package private) voidntsp()A non-trailing space.(package private) voidpopIndent(FormatPreferences.Indentation indentation) (package private) void(package private) voidpopThisType(AbstractJType thisType) (package private) void(package private) voidpushIndent(FormatPreferences.Indentation indentation) (package private) voidpushIndent(Indent indent) (package private) voidpushThisType(AbstractJType thisType) (package private) voidsetClassFile(ImplJSourceFile classFile) (package private) voidsp()Force a space if one hasn't already been added.(package private) voidwrite(AbstractJExpr expr) (package private) voidwrite(AbstractJType type) (package private) voidwrite(FormatPreferences.Space rule) (package private) void(package private) void(package private) void(package private) voidwriteClass(String nameToWrite) (package private) voidwriteEscaped(char item) (package private) voidwriteEscaped(String item) (package private) voidwriteEscapedWord(String rawText) (package private) voidwriteUnescaped(char item) (package private) voidwriteUnescaped(String item)
-
Field Details
-
format
-
countingWriter
-
lineBuffer
-
lineSep
-
thisTypeStack
-
indentStack
-
stackIterator
-
nextIndent
-
state
-
spaceState
private int spaceState -
classFile
-
SS_NONE
private static final int SS_NONE- See Also:
-
SS_NEEDED
private static final int SS_NEEDED- See Also:
-
SS_ADDED
private static final int SS_ADDED- See Also:
-
SS_NEW_LINE
private static final int SS_NEW_LINE- See Also:
-
SS_2_NEW_LINE
private static final int SS_2_NEW_LINE- See Also:
-
-
Constructor Details
-
SourceFileWriter
SourceFileWriter(FormatPreferences format, Writer writer)
-
-
Method Details
-
nl
- Throws:
IOException
-
sp
Force a space if one hasn't already been added.- Throws:
IOException- etc.
-
ntsp
-
getLine
int getLine() -
getColumn
int getColumn() -
processSpacing
- Throws:
IOException
-
addIndent
- Throws:
IOException
-
writeEscaped
- Throws:
IOException
-
writeEscaped
- Throws:
IOException
-
writeUnescaped
- Throws:
IOException
-
writeUnescaped
- Throws:
IOException
-
write
- Throws:
IOException
-
writeClass
- Throws:
IOException
-
addWordSpace
- Throws:
IOException
-
write
- Throws:
IOException
-
writeEscapedWord
- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
pushIndent
-
pushIndent
-
popIndent
-
popIndent
-
getThisType
AbstractJType getThisType() -
pushThisType
-
popThisType
-
setClassFile
-
getState
Token getState() -
getClassFile
ImplJSourceFile getClassFile() -
getFormat
FormatPreferences getFormat()
-