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 java.lang.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.- Author:
- cstamas
-
-
Field Summary
Fields Modifier and Type Field Description protected org.yaml.snakeyaml.Yaml_yaml
-
Constructor Summary
Constructors Constructor Description YamlGemSpecificationIO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.yaml.snakeyaml.YamlgetYaml()GemSpecificationread(java.lang.String string)protected GemSpecificationreadGemSpecfromYaml(java.lang.String gemspecString)protected GemSpecificationreadGemSpecfromYamlWithSnakeYaml(java.lang.String gemspecString)java.lang.Stringwrite(GemSpecification gemspec)protected java.lang.StringwriteGemSpectoYaml(GemSpecification gemspec)protected java.lang.StringwriteGemSpectoYamlWithSnakeYaml(GemSpecification gemspec)
-
-
-
Method Detail
-
read
public GemSpecification read(java.lang.String string) throws java.io.IOException
- Specified by:
readin interfaceGemSpecificationIO- Throws:
java.io.IOException
-
write
public java.lang.String write(GemSpecification gemspec) throws java.io.IOException
- Specified by:
writein interfaceGemSpecificationIO- Throws:
java.io.IOException
-
getYaml
protected org.yaml.snakeyaml.Yaml getYaml()
-
readGemSpecfromYaml
protected GemSpecification readGemSpecfromYaml(java.lang.String gemspecString) throws java.io.IOException
- Throws:
java.io.IOException
-
writeGemSpectoYaml
protected java.lang.String writeGemSpectoYaml(GemSpecification gemspec) throws java.io.IOException
- Throws:
java.io.IOException
-
readGemSpecfromYamlWithSnakeYaml
protected GemSpecification readGemSpecfromYamlWithSnakeYaml(java.lang.String gemspecString) throws java.io.IOException
- Throws:
java.io.IOException
-
writeGemSpectoYamlWithSnakeYaml
protected java.lang.String writeGemSpectoYamlWithSnakeYaml(GemSpecification gemspec) throws java.io.IOException
- Throws:
java.io.IOException
-
-