Good question. We're using "executable" throughout the RI code base as
common term for constructors and methods (which are largely handled in
a unified way).
So there could be an "ExecutableDescriptor" (in the RI, we have
ExecutableDescriptorImpl as common implementation of MethodDescriptor
and ConstructorDescriptor). Although the name is a bit ambiguous, as
it's not about a descriptor which is executable but a descriptor for
an executable (element).
If we want to go that way, we might also think about pulling up
getName() which might then return the class name (that's what
java.lang.reflect.Constructor#getName() does). We then might either
get rid of Method- and ConstructorDescriptor altogether or have them
as empty interfaces for discrimination.
Considering the usefulness, a common interface would help implementing
interceptors for methods and constructors, of which I guess there
won't be that many, so the benefit is probably not that huge.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Gunnar:
Good question. We're using "executable" throughout the RI code base as
common term for constructors and methods (which are largely handled in
a unified way).
So there could be an "ExecutableDescriptor" (in the RI, we have
ExecutableDescriptorImpl as common implementation of MethodDescriptor
and ConstructorDescriptor). Although the name is a bit ambiguous, as
it's not about a descriptor which is executable but a descriptor for
an executable (element).
If we want to go that way, we might also think about pulling up
getName() which might then return the class name (that's what
java.lang.reflect.Constructor#getName() does). We then might either
get rid of Method- and ConstructorDescriptor altogether or have them
as empty interfaces for discrimination.
Considering the usefulness, a common interface would help implementing
interceptors for methods and constructors, of which I guess there
won't be that many, so the benefit is probably not that huge.