Package de.saumya.mojo.gems.spec.yaml
Class YamlGemSpecificationIO
java.lang.Object
de.saumya.mojo.gems.spec.yaml.YamlGemSpecificationIO
- All Implemented Interfaces:
GemSpecificationIO
@Component(role=GemSpecificationIO.class,
hint="yaml")
public class YamlGemSpecificationIO
extends Object
implements GemSpecificationIO
This is here just be able to quickly switch between snakeYaml and YamlBeans,
since they are both good, with their own quirks. SnakeYaml won ;) So we can
clear up this later.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.yaml.snakeyaml.YamlgetYaml()protected GemSpecificationreadGemSpecfromYaml(String gemspecString) protected GemSpecificationreadGemSpecfromYamlWithSnakeYaml(String gemspecString) write(GemSpecification gemspec) protected StringwriteGemSpectoYaml(GemSpecification gemspec) protected String
-
Field Details
-
_yaml
protected org.yaml.snakeyaml.Yaml _yaml
-
-
Constructor Details
-
YamlGemSpecificationIO
public YamlGemSpecificationIO()
-
-
Method Details
-
read
- Specified by:
readin interfaceGemSpecificationIO- Throws:
IOException
-
write
- Specified by:
writein interfaceGemSpecificationIO- Throws:
IOException
-
getYaml
protected org.yaml.snakeyaml.Yaml getYaml() -
readGemSpecfromYaml
- Throws:
IOException
-
writeGemSpectoYaml
- Throws:
IOException
-
readGemSpecfromYamlWithSnakeYaml
protected GemSpecification readGemSpecfromYamlWithSnakeYaml(String gemspecString) throws IOException - Throws:
IOException
-
writeGemSpectoYamlWithSnakeYaml
- Throws:
IOException
-