← Prev in month ← Prev in thread
Next in thread → Next in month →

Why is @Property.required attribute MUST be true for constructor parameter?

From
C Vamsi <>
Date
2009-02-23T18:40:48+00:00
ID
Thread
Why is @Property.required attribute MUST be true for constructor parameter?
sca-javacaa-1.1-spec-cd02-rev2.doc:

Sec 9.15 @Property

Lines 1622-1623:
required (optional) – specifies whether injection is required, defaults to
true. For a constructor parameter annotation, this attribute MUST have the
value true.

Q: Why is, "For a constructor parameter annotation, this attribute MUST
have the value true." required?

The componentType can define a default value for the property. In this
case, even if a property is not specified in the component definition, the
runtime will still have a value to pass as an argument to the constructor.


++Vamsi
Apache Tuscany Committer  http://tuscany.apache.org
Apache Geronimo Committer and Member of PMC  http://geronimo.apache.org
← Prev in month ← Prev in thread
Next in thread → Next in month →