lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Why is final?
Date Sun, 11 Jul 2004 15:20:24 GMT
Kevin A. Burton wrote:
> I was going to create a new IDField class which just calls super( name, 
> value, false, true, false) but noticed I was prevented because 
> is final?

You don't need to subclass to do this, just a static method somewhere.

> Why is this?  I can't see any harm in making it non-final...

Field and Document are not designed to be extensible.  They are 
persisted in such a way that added methods are not available when the 
field is restored.  In other words, when a field is read, it always 
constructs an instance of Field, not a subclass.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message