Class ProjectContext
- java.lang.Object
-
- io.freefair.gradle.codegenerator.api.ProjectContext
-
- All Implemented Interfaces:
Serializable
public class ProjectContext extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconfigurationExists(String key)List<ProjectFile>getAllFiles()ObjectgetConfigurationValue(String key)<T> TgetConfigurationValueAs(String key, Class<T> clazz)FilegetInputDir()StringgetNamespaceFromFile(File file)FilegetOutputDir()FilegetRootDir()StringgetSourceSet()StringreadFile(String namespace, String filename)StringreadFile(String namespace, String filename, String encoding)byte[]readFileToByteArray(String namespace, String filename)voidwriteOutputFile(String namespace, String filename, byte[] content)voidwriteOutputFile(String namespace, String filename, String content)
-
-
-
Method Detail
-
getAllFiles
public List<ProjectFile> getAllFiles()
-
readFileToByteArray
public byte[] readFileToByteArray(String namespace, String filename) throws IOException
- Throws:
IOException
-
readFile
public String readFile(String namespace, String filename) throws IOException
- Throws:
IOException
-
readFile
public String readFile(String namespace, String filename, String encoding) throws IOException
- Throws:
IOException
-
writeOutputFile
public void writeOutputFile(String namespace, String filename, String content) throws IOException
- Throws:
IOException
-
writeOutputFile
public void writeOutputFile(String namespace, String filename, byte[] content) throws IOException
- Throws:
IOException
-
configurationExists
public boolean configurationExists(String key)
-
getRootDir
public File getRootDir()
-
getInputDir
public File getInputDir()
-
getOutputDir
public File getOutputDir()
-
getSourceSet
public String getSourceSet()
-
-