Giter Club home page Giter Club logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
Question: 
SnakeYAML does not work properly with the above class.
This is because setter returns an object instead of void.
==============================
Answer: 
this is not a SnakeYAML issue. This class violates the JavaBean spec.
I can imagine this was possibly desired by someone to implement a "chaining" 
style of 
coding, but this is no longer a correct JavaBean. The JavaBean spec requires 
that the 
return type of set* functions be 'void', and various tools and frameworks 
enforce 
this requirement. (XmlEncoder for instance)
If a chaining-style setter is desired, I'd recommend making this a separate 
method on 
the bean rather than replacing the standard setter.

Original comment by [email protected] on 20 Jan 2010 at 3:06

  • Added labels: ****
  • Removed labels: ****

from snakeyaml.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
py4fun is correct and naming things in a way spec says gives you (almost) what 
you want  out of the box.
But if you still need this one to work you may try to create corresponding 
BeanInfo class and provide correct 
PropertyDescriptor for the id giving setId as a setter name.

so it will be EntityBeanInfo in the same package as Entity or you have to set 
up Introspector BeanInfo paths and 
so on. 

(consult JavaBeans spec. 8 Introspection)

Original comment by [email protected] on 20 Jan 2010 at 7:37

  • Added labels: ****
  • Removed labels: ****

from snakeyaml.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
It is also possible to provide your own Constructor and Representer to work 
with the
Entity class.

Original comment by [email protected] on 22 Jan 2010 at 9:28

  • Changed state: WontFix
  • Added labels: ****
  • Removed labels: ****

from snakeyaml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.