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 boolean
configurationExists(String key)
List<ProjectFile>
getAllFiles()
Object
getConfigurationValue(String key)
<T> T
getConfigurationValueAs(String key, Class<T> clazz)
File
getInputDir()
String
getNamespaceFromFile(File file)
File
getOutputDir()
File
getRootDir()
String
getSourceSet()
String
readFile(String namespace, String filename)
String
readFile(String namespace, String filename, String encoding)
byte[]
readFileToByteArray(String namespace, String filename)
void
writeOutputFile(String namespace, String filename, byte[] content)
void
writeOutputFile(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()
-
-