[jboss-dev-forums] [Design the new POJO MicroContainer] - Inheritance of annotations in PropertyInfo
scott.stark@jboss.org
do-not-reply at jboss.com
Sun Nov 23 17:46:17 EST 2008
What is the expected behavior of annotations on properties when subclasses override the accessors? I'm seeing that annotations are only visible if the overridden method also copies the annotations, as in this managedConnectionFactoryProperties example:
| public class ManagedConnectionFactoryDeploymentMetaData
| implements Serializable, ConnectionPoolMetaData
| {
| @ManagementProperty(name="config-property", managed=true, includeInTemplate=true)
| public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
| {
| return managedConnectionFactoryProperties;
| }
| ...
|
| public abstract class NonXADataSourceDeploymentMetaData extends DataSourceDeploymentMetaData
| {
| @ManagementProperty(name="config-property",
| description="The connection factory property info",
| managed=true, includeInTemplate=true)
| public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
|
|
This is true even if @Inherited is a meta-annotation on the annotation. Is that expected behavior?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191567#4191567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191567
More information about the jboss-dev-forums
mailing list