ilmoeuro / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
0 stars 0 forks source link

JavaBeans constructor/representer could be more efficient #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In Representer.java, it looks as though a new Set<Property> is created for
each instance of a bean, instead of for each *type* of bean.

In Constructor.java, it's even worse, a Property is obtained by iterating
through the fields/methods of a JavaBean, for each property, for each
instance of the bean.

Ideally, you would create some sort of blueprint for each new *type* (ie.
class) of JavaBean you come across. The blueprint might store a Map<String,
Property> (or something), then have methods to construct/represent a given
instance of the JavaBean, something like the ObjectBlueprint class I linked
to in issue#15. 

Original issue reported on code.google.com by infinity0x@gmail.com on 22 Aug 2009 at 5:10

GoogleCodeExporter commented 9 years ago

Original comment by py4fun@gmail.com on 31 Aug 2009 at 11:35