* mark FpcBitSet as implementing JLCloneable so it can be cloned,

and add clone() method that calls inherited clone so that in case
    of reflection lookup it will be found in this class rather than
    getting an exception and having to search the parent class (will
    be used in threadvar implementation)

git-svn-id: branches/jvmbackend@18809 -
This commit is contained in:
Jonas Maebe 2011-08-23 15:25:35 +00:00
parent 2ddc8d6a3c
commit 44f074ebaa
2 changed files with 8 additions and 1 deletions

View File

@ -14,6 +14,11 @@
**********************************************************************}
function FpcBitSet.clone: JLObject;
begin
result:=inherited;
end;
function FpcBitSet.add(elem: jint): FpcBitSet;
begin

View File

@ -18,7 +18,9 @@ type
{ Adds support for a "base" value that is used as lower bound for the set's
contents }
FpcBitSet = class sealed (JUBitSet)
FpcBitSet = class sealed (JUBitSet,JLCloneable)
{ so we can look it up in this class rather than only in the parent }
function clone: JLObject;override;
function add(elem: jint): FpcBitSet;
function addAll(s: FpcBitSet): FpcBitSet;
function remove(elem: jint): FpcBitSet;