Class TextFileBuilder
- java.lang.Object
-
- net.sourceforge.pmd.lang.document.TextFileBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected @Nullable String
displayName
protected LanguageVersion
languageVersion
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TextFileBuilder
asReadOnly()
Specify that the built file is read only.abstract TextFile
build()
Creates and returns the new text file.TextFileBuilder
withDisplayName(@Nullable String displayName)
Sets a custom display name for the new file.
-
-
-
Field Detail
-
languageVersion
protected final LanguageVersion languageVersion
-
displayName
protected @Nullable String displayName
-
-
Method Detail
-
asReadOnly
public TextFileBuilder asReadOnly()
Specify that the built file is read only. Some text files are always read-only.- Returns:
- This builder
-
withDisplayName
public TextFileBuilder withDisplayName(@Nullable String displayName)
Sets a custom display name for the new file. If null, or this is never called, the display name defaults to the path ID.- Parameters:
displayName
- A display name- Returns:
- This builder
-
build
public abstract TextFile build()
Creates and returns the new text file.
-
-