This content has been marked as final.
Show 1 reply
-
1. Re: change in ClassAdapter to support annotation overrides.
adrian.brock Apr 1, 2005 3:50 PM (in response to bill.burke)There are a number of problems with that approach,
but I'm open to suggestions if you have a cleaner solution.
1) Class vs Bean abstraction
ClassAdapter is in container whereas BeanMetaData is part of kernel.
Also BeanMetaData deals with properties, e.g.<property name="whatever"> <annotation name="SecurityRoles" value="Manager"/> </property>
Whereas the ClassAdaptor would only know about fields or getter/setters.
There is an impedence between the plain class model and the javabean model.
2) Controlling instances
How are you told/remember you want a class level or instance level ClassAdapter/JoinpointFactory.
3) The type model is not restricted to the top level beans
The kernel also needs to get hold of ClassInfo objects for configuration like:<bean class="MyClass"> <property name="array"> <array type="java.net.URL"> <value>http://localhost:8080</value> </>
Ideally, I want to use the same class model and joinpoint model for
both the "class=" and "type="
rather than having to do it in different ways depending on
which part of the metadata it appears.
So I want some hook into the ClassInfos even when it is not BeanMetaData.
The problem is essential how does the value metadata handle the following:/** * Get the value. * * @param info the type info * @return the value. * @throws Throwable for any error */ Object getValue(TypeInfo info) throws Throwable;
when the value metadata could be StringValueMetaData or CollectionValueMetaData
or XXXXValueMetaData that creates values/Objects based on whatever rules you like
but it still needs to know the target type, either from the property itself or it is told it
in the case that you want to be explicit and use a specific concrete implementation.public List getWhatever(); public void setWhatever(List); <property name="whatever" type="java.util.ArrayList"> ...
See also:
http://jira.jboss.com/jira/browse/JBMICROCONT-29