42
42
import org .springframework .util .StringUtils ;
43
43
44
44
/**
45
- * Base class for Yaml factories.
45
+ * Base class for YAML factories.
46
46
*
47
47
* @author Dave Syer
48
48
* @since 4.1
@@ -65,7 +65,6 @@ public abstract class YamlProcessor {
65
65
* some of the documents in a YAML resource. In YAML documents are
66
66
* separated by <code>---<code> lines, and each document is converted
67
67
* to properties before the match is made. E.g.
68
- *
69
68
* <pre class="code">
70
69
* environment: dev
71
70
* url: http://dev.bar.com
@@ -75,11 +74,9 @@ public abstract class YamlProcessor {
75
74
* url:http://foo.bar.com
76
75
* name: My Cool App
77
76
* </pre>
78
- *
79
77
* when mapped with
80
78
* <code>documentMatchers = YamlProcessor.mapMatcher({"environment": "prod"})</code>
81
79
* would end up as
82
- *
83
80
* <pre class="code">
84
81
* environment=prod
85
82
* url=http://foo.bar.com
@@ -103,9 +100,9 @@ public void setMatchDefault(boolean matchDefault) {
103
100
}
104
101
105
102
/**
106
- * Method to use for resolving resources. Each resource will be converted to a Map, so
107
- * this property is used to decide which map entries to keep in the final output from
108
- * this factory.
103
+ * Method to use for resolving resources. Each resource will be converted to a Map,
104
+ * so this property is used to decide which map entries to keep in the final output
105
+ * from this factory.
109
106
* @param resolutionMethod the resolution method to set (defaults to
110
107
* {@link ResolutionMethod#OVERRIDE}).
111
108
*/
@@ -127,9 +124,9 @@ public void setResources(Resource... resources) {
127
124
* Provide an opportunity for subclasses to process the Yaml parsed from the supplied
128
125
* resources. Each resource is parsed in turn and the documents inside checked against
129
126
* the {@link #setDocumentMatchers(DocumentMatcher...) matchers}. If a document
130
- * matches it is passed into the callback, along with its representation as
131
- * Properties. Depending on the {@link #setResolutionMethod(ResolutionMethod)} not all
132
- * of the documents will be parsed.
127
+ * matches it is passed into the callback, along with its representation as Properties.
128
+ * Depending on the {@link #setResolutionMethod(ResolutionMethod)} not all of the
129
+ * documents will be parsed.
133
130
* @param callback a callback to delegate to once matching documents are found
134
131
* @see #createYaml()
135
132
*/
@@ -393,6 +390,11 @@ public enum ResolutionMethod {
393
390
*/
394
391
protected static class StrictMapAppenderConstructor extends Constructor {
395
392
393
+ // Declared as public for use in subclasses
394
+ public StrictMapAppenderConstructor () {
395
+ super ();
396
+ }
397
+
396
398
@ Override
397
399
protected Map <Object , Object > constructMapping (MappingNode node ) {
398
400
try {
@@ -421,7 +423,6 @@ public Set<Entry<Object, Object>> entrySet() {
421
423
}
422
424
};
423
425
}
424
-
425
426
}
426
427
427
428
}
0 commit comments