aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/examples/CustomConstructor.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/examples/CustomConstructor.java')
-rw-r--r--src/test/java/examples/CustomConstructor.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/java/examples/CustomConstructor.java b/src/test/java/examples/CustomConstructor.java
new file mode 100644
index 00000000..a057fa27
--- /dev/null
+++ b/src/test/java/examples/CustomConstructor.java
@@ -0,0 +1,22 @@
+/*
+ * See LICENSE file in distribution for copyright and licensing information.
+ */
+package examples;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.yaml.snakeyaml.Invoice;
+import org.yaml.snakeyaml.constructor.Constructor;
+
+public class CustomConstructor extends Constructor {
+
+ public CustomConstructor() {
+ super(Invoice.class);
+ }
+
+ @Override
+ protected List<Object> createDefaultList(int initSize) {
+ return new ArrayList<Object>(initSize);
+ }
+} \ No newline at end of file