Module com.google.googlejavaformat
Class FormattingFiler
java.lang.Object
com.google.googlejavaformat.java.filer.FormattingFiler
- All Implemented Interfaces:
Filer
public final class FormattingFiler extends Object implements Filer
-
Constructor Summary
Constructors Constructor Description FormattingFiler(Filer delegate)FormattingFiler(Filer delegate, @Nullable Messager messager)Create a newFormattingFiler. -
Method Summary
Modifier and Type Method Description JavaFileObjectcreateClassFile(CharSequence name, Element... originatingElements)FileObjectcreateResource(JavaFileManager.Location location, CharSequence pkg, CharSequence relativeName, Element... originatingElements)JavaFileObjectcreateSourceFile(CharSequence name, Element... originatingElements)FileObjectgetResource(JavaFileManager.Location location, CharSequence pkg, CharSequence relativeName)
-
Constructor Details
-
FormattingFiler
- Parameters:
delegate- filer to decorate
-
FormattingFiler
Create a newFormattingFiler. An optionalMessagermay be specified to make logs more visible.- Parameters:
delegate- filer to decoratemessager- to log warnings to
-
-
Method Details
-
createSourceFile
public JavaFileObject createSourceFile(CharSequence name, Element... originatingElements) throws IOException- Specified by:
createSourceFilein interfaceFiler- Throws:
IOException
-
createClassFile
public JavaFileObject createClassFile(CharSequence name, Element... originatingElements) throws IOException- Specified by:
createClassFilein interfaceFiler- Throws:
IOException
-
createResource
public FileObject createResource(JavaFileManager.Location location, CharSequence pkg, CharSequence relativeName, Element... originatingElements) throws IOException- Specified by:
createResourcein interfaceFiler- Throws:
IOException
-
getResource
public FileObject getResource(JavaFileManager.Location location, CharSequence pkg, CharSequence relativeName) throws IOException- Specified by:
getResourcein interfaceFiler- Throws:
IOException
-