marcusaram / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
Apache License 2.0
1 stars 0 forks source link

Introduce multi contructors (tag prefix) #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
At the moment SnakeYAML always tries to match the complete tag to 
construct an instance. 
It shall be possible to define the beginning of the tag (tag prefix)? 
Then for these 2 tags: 
!!org.foo.Bar111 
!!org.foo.Bar222 
it should be possible to define a constructor with tag prefix "!! 
org.foo". 
Then a constructor may process a family of tags.
The prefix is only checked when no exact match found.

Original issue reported on code.google.com by py4fun@gmail.com on 25 Nov 2009 at 8:53

GoogleCodeExporter commented 9 years ago
Implemented.
An example is here:
http://code.google.com/p/snakeyaml/source/browse/src/test/java/org/yaml/snakeyam
l/const
ructor/PrefixConstructorTest.java

Original comment by py4fun@gmail.com on 25 Nov 2009 at 9:32