summaryrefslogtreecommitdiffstats
path: root/libjava/java/security/KeyPairGeneratorSpi.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/security/KeyPairGeneratorSpi.java')
-rw-r--r--libjava/java/security/KeyPairGeneratorSpi.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/libjava/java/security/KeyPairGeneratorSpi.java b/libjava/java/security/KeyPairGeneratorSpi.java
index 9e929e032fb..735dd6498f9 100644
--- a/libjava/java/security/KeyPairGeneratorSpi.java
+++ b/libjava/java/security/KeyPairGeneratorSpi.java
@@ -1,5 +1,5 @@
/* KeyPairGeneratorSpi.java --- Key Pair Generator SPI Class
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -90,4 +90,20 @@ public abstract class KeyPairGeneratorSpi
@return a key pair
*/
public abstract KeyPair generateKeyPair();
+
+ /**
+ Returns a clone of this class.
+
+ If cloning is not supported, then by default the class throws a
+ CloneNotSupportedException. The MessageDigestSpi provider
+ implementation has to overload this class in order to be
+ cloneable.
+ */
+ public Object clone() throws CloneNotSupportedException
+ {
+ if (this instanceof Cloneable)
+ return super.clone();
+ else
+ throw new CloneNotSupportedException();
+ }
}
OpenPOWER on IntegriCloud