Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #1539
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Newsgroups | comp.lang.java.help |
| Subject | Re: MappedSuperClass annotation |
| References | <4f22cb6e$2@news.x-privat.org> <jfurls$srq$1@news.albasani.net> |
| Message-ID | <L6EUq.3960$Au5.2987@newsfe23.iad> (permalink) |
| Date | 2012-01-27 12:50 -0800 |
On 1/27/12 10:50 AM, Lew wrote:
> Pidi wrote:
>> If an abstract class inherits from an abstract superclass annotated with
>> @MappedSuperclass, it inherits the annotation too or if I want both
>> annotated
>> I have to replicate the annotation?
>>
>> Ex:
>> @MappedSuperclass
>> public abstract Class1 {
>> ...
>> }
>>
>> @MappedSuperclass <-- I have to declare it or it's implicit?
>> public abstract Class2 extends Class1{
>> ...
>> }
>
> You have to declare it. Annotations do not inherit.
True, and that annotation specifically needs to be declared everywhere
you want the effect.
In general though, it is up to the framework which utilizes the
annotations to decide if they want to climb up the inheritance or not.
Back to comp.lang.java.help | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
MappedSuperClass annotation Pidi <lamia@mail.com> - 2012-01-27 17:05 +0100
Re: MappedSuperClass annotation Lew <noone@lewscanon.com> - 2012-01-27 10:50 -0800
Re: MappedSuperClass annotation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-01-27 12:50 -0800
Re: MappedSuperClass annotation Lew <noone@lewscanon.com> - 2012-01-27 19:24 -0800
Re: MappedSuperClass annotation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-01-29 08:53 -0800
Re: MappedSuperClass annotation Lew <noone@lewscanon.com> - 2012-01-29 10:05 -0800
Re: MappedSuperClass annotation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-01-29 22:45 -0800
Re: MappedSuperClass annotation Lew <noone@lewscanon.com> - 2012-01-30 10:06 -0800
Re: MappedSuperClass annotation Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-31 06:52 -0400
Re: MappedSuperClass annotation Lew <noone@lewscanon.com> - 2012-01-31 11:07 -0800
Re: MappedSuperClass annotation Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-28 12:02 -0400
csiph-web