Can't construct a java object for tag:yaml.org,2002:com.opencloud.rhino.facilities.sas.bundle.MiniBundle; exception=Cannot create property=avents for JavaBean=com.opencloud.rhino.facilities.sas.bundle.MiniBundle@0; Unable to find property 'avents' on class: com.opencloud.rhino.facilities.sas.bundle.MiniBundle in 'reader', line 2, column 1: avents: ^
Class MiniBundleParser
- java.lang.Object
-
- com.opencloud.rhino.facilities.sas.bundle.MiniBundleParser
-
public class MiniBundleParser extends Object
Parse and validate mini-bundles for SAS. Does an ugly double load so we can produce human readable error messages for the common bundle syntax errors. SnakeYAML doesn’t make it easy to return your own error messages for things like misnamed or mistyped fields. A typical exception from SnakeYAML is
Stripping the layers of wrapping gives:
Unable to find property 'avents' on class: com.opencloud.rhino.facilities.sas.bundle.MiniBundle.
This loses the position of the error. What we want is to report errors with the position and a clear explanation. We can give the explanation by performing semantic validation on a Map representation of the bundle and preserve position data for unexpected cases by wrapping the initial cause of the ConstructorException. This class is not thread safe.
-
-
Constructor Summary
Constructors Constructor Description MiniBundleParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MiniBundle
parse(byte[] bundleIn, String name)
MiniBundle
parse(File bundleIn)
static String
toJavaIdentifier(String text)
static String
underscoreNameToClassname(String enumDescription)
-
-
-
Method Detail
-
parse
public MiniBundle parse(File bundleIn) throws IOException
- Throws:
IOException
-
parse
public MiniBundle parse(byte[] bundleIn, String name) throws IOException
- Throws:
IOException
-
-