Class FileObjects
java.lang.Object
com.google.errorprone.FileObjects
Factories for in-memory
JavaFileObjects, for testing.-
Method Summary
Modifier and TypeMethodDescriptionstatic JavaFileObjectforResource(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 intoJavaFileObjects.static JavaFileObjectforSourceLines(String path, String... lines) Creates aJavaFileObjectwith 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 intoJavaFileObjects. -
forResource
Loads a resource of the provided class into aJavaFileObject. -
forSourceLines
Creates aJavaFileObjectwith the given name and content.
-