From 6d54b6cec85d2f3f5d68bdc9140cc65f073ae59a Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 14 Aug 2009 08:51:10 -0600 Subject: [PATCH] add classes which I meant to add in earlier commits --- classpath/java/lang/Package.java | 46 ++++++++++++++++++++++ classpath/java/lang/ref/SoftReference.java | 21 ++++++++++ classpath/java/util/Formatter.java | 23 +++++++++++ 3 files changed, 90 insertions(+) create mode 100644 classpath/java/lang/Package.java create mode 100644 classpath/java/lang/ref/SoftReference.java create mode 100644 classpath/java/util/Formatter.java diff --git a/classpath/java/lang/Package.java b/classpath/java/lang/Package.java new file mode 100644 index 0000000000..7740c78c0d --- /dev/null +++ b/classpath/java/lang/Package.java @@ -0,0 +1,46 @@ +/* Copyright (c) 2008, Avian Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice appear + in all copies. + + There is NO WARRANTY for this software. See license.txt for + details. */ + +package java.lang; + +import java.net.URL; + +public class Package { + private final String name; + private final String implementationTitle; + private final String implementationVendor; + private final String implementationVersion; + private final String specementationTitle; + private final String specementationVendor; + private final String specementationVersion; + private final URL sealed; + private final ClassLoader loader; + + Package(String name, + String implementationTitle, + String implementationVendor, + String implementationVersion, + String specementationTitle, + String specementationVendor, + String specementationVersion, + URL sealed, + ClassLoader loader) + { + this.name = name; + this.implementationTitle = implementationTitle; + this.implementationVendor = implementationVendor; + this.implementationVersion = implementationVersion; + this.specementationTitle = specementationTitle; + this.specementationVendor = specementationVendor; + this.specementationVersion = specementationVersion; + this.sealed = sealed; + this.loader = loader; + } +} diff --git a/classpath/java/lang/ref/SoftReference.java b/classpath/java/lang/ref/SoftReference.java new file mode 100644 index 0000000000..bd76b1c6af --- /dev/null +++ b/classpath/java/lang/ref/SoftReference.java @@ -0,0 +1,21 @@ +/* Copyright (c) 2009, Avian Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice appear + in all copies. + + There is NO WARRANTY for this software. See license.txt for + details. */ + +package java.lang.ref; + +public class SoftReference extends Reference { + public SoftReference(T target, ReferenceQueue queue) { + super(target, queue); + } + + public SoftReference(T target) { + this(target, null); + } +} diff --git a/classpath/java/util/Formatter.java b/classpath/java/util/Formatter.java new file mode 100644 index 0000000000..6acf9b5fba --- /dev/null +++ b/classpath/java/util/Formatter.java @@ -0,0 +1,23 @@ +/* Copyright (c) 2009, Avian Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice appear + in all copies. + + There is NO WARRANTY for this software. See license.txt for + details. */ + +package java.util; + +public class Formatter { + private final Locale locale; + + public Formatter(Locale locale) { + this.locale = locale; + } + + public Formatter format(String format, Object ... args) { + throw new UnsupportedOperationException(); + } +}