Class FileObjects
java.lang.Object
com.google.errorprone.FileObjects
Factories for in-memory
JavaFileObject
s, for testing.-
Method Summary
Modifier and TypeMethodDescriptionstatic JavaFileObject
forResource
(Class<?> clazz, String resourceName) Loads a resource of the provided class into aJavaFileObject
.static com.google.common.collect.ImmutableList
<JavaFileObject> forResources
(Class<?> clazz, String... fileNames) Loads resources of the provided class intoJavaFileObject
s.static JavaFileObject
forSourceLines
(String path, String... lines) Creates aJavaFileObject
with the given name and content.
-
Method Details
-
forResources
public static com.google.common.collect.ImmutableList<JavaFileObject> forResources(Class<?> clazz, String... fileNames) Loads resources of the provided class intoJavaFileObject
s. -
forResource
Loads a resource of the provided class into aJavaFileObject
. -
forSourceLines
Creates aJavaFileObject
with the given name and content.
-