Package com.google.errorprone
Class FileObjects
- java.lang.Object
-
- com.google.errorprone.FileObjects
-
public final class FileObjects extends Object
Factories for in-memoryJavaFileObject
s, for testing.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
forResources
public static com.google.common.collect.ImmutableList<JavaFileObject> forResources(Class<?> clazz, String... fileNames)
Loads resources of the provided class intoJavaFileObject
s.
-
forResource
public static JavaFileObject forResource(Class<?> clazz, String resourceName)
Loads a resource of the provided class into aJavaFileObject
.
-
forSourceLines
public static JavaFileObject forSourceLines(String path, String... lines)
Creates aJavaFileObject
with the given name and content.
-
-