Difference between revisions of "Java home"
(→Tips and Tricks) |
(clonen) |
||
Zeile 42: | Zeile 42: | ||
=== Links === |
=== Links === |
||
*http://www.mindview.net/Etc/Discussions/CheckedExceptions |
*http://www.mindview.net/Etc/Discussions/CheckedExceptions |
||
+ | |||
+ | == Clonen von Objekten == |
||
+ | <pre> |
||
+ | /** Objekt clonen (unter Verwendung von Object.clone()). |
||
+ | * @see java.lang.Object#clone() |
||
+ | * @return Clone oder null, falls Object.clone() CloneNotSupportedException lieferte |
||
+ | */ |
||
+ | public BkaEingabeDatensatzKopfsatz clone() { |
||
+ | try { |
||
+ | return (BkaEingabeDatensatzKopfsatz) super.clone(); |
||
+ | } catch (CloneNotSupportedException e) { |
||
+ | return null; |
||
+ | } |
||
+ | } |
||
+ | </pre> |
||
+ | |||
+ | === Links === |
||
+ | *http://angelikalanger.com/Articles/JavaSpektrum/05.Clone-Part1/05.Clone-Part1.html |
||
+ | *http://angelikalanger.com/Articles/JavaSpektrum/06.Clone-Part2/06.Clone-Part2.html |
||
+ | *http://angelikalanger.com/Articles/JavaSpektrum/07.Clone-Part3/07.Clone-Part3.html |
Version vom 07:49, 21 Juni 2007
Inhaltsverzeichnis
Runtime Environments
Links
Tips and Tricks
Rules Engines
Overview
Business Rules Management Systems (BRMS), decision tables (Entscheidungstabellen)
Links
- information
- standards
- implementations
JUnit
Version Info
Manchmal möchte man die Version einer junit-JAR herausbekommen. Das manifest enthält nichts und die Klasse Version keine Main-Methode.
import junit.runner.Version; public class JUnitVersion { public static void main(String[] args) { System.out.println(Version.id()); } }
Exceptions
Links
Clonen von Objekten
/** Objekt clonen (unter Verwendung von Object.clone()). * @see java.lang.Object#clone() * @return Clone oder null, falls Object.clone() CloneNotSupportedException lieferte */ public BkaEingabeDatensatzKopfsatz clone() { try { return (BkaEingabeDatensatzKopfsatz) super.clone(); } catch (CloneNotSupportedException e) { return null; } }