summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSCoding.java
diff options
context:
space:
mode:
Diffstat (limited to 'projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSCoding.java')
-rw-r--r--projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSCoding.java35
1 files changed, 28 insertions, 7 deletions
diff --git a/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSCoding.java b/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSCoding.java
index c578dbc..330e682 100644
--- a/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSCoding.java
+++ b/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSCoding.java
@@ -39,11 +39,13 @@ public interface NSCoding {
public static class _BigDecimalSupport extends _BigIntegerSupport {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
/** Not yet implemented */
+ @Override
public Object decodeObject(NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -58,11 +60,13 @@ public interface NSCoding {
public static class _BigIntegerSupport extends Support {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
/** Not yet implemented */
+ @Override
public Object decodeObject(NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -87,6 +91,7 @@ public interface NSCoding {
public static class _DoubleSupport extends _NumberSupport {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -101,6 +106,7 @@ public interface NSCoding {
public static class _FloatSupport extends _NumberSupport {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -115,6 +121,7 @@ public interface NSCoding {
public static class _LongSupport extends _NumberSupport {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -129,6 +136,7 @@ public interface NSCoding {
public static class _IntegerSupport extends _NumberSupport {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -143,6 +151,7 @@ public interface NSCoding {
public static class _ShortSupport extends _NumberSupport {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -157,6 +166,7 @@ public interface NSCoding {
public static class _ByteSupport extends _NumberSupport {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -171,16 +181,19 @@ public interface NSCoding {
public static class _NumberSupport extends Support {
/** Not yet implemented */
- public Class classForCoder(Object obj) {
+ @Override
+ public Class<?> classForCoder(Object obj) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
/** Not yet implemented */
+ @Override
public Object decodeObject(NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -195,11 +208,13 @@ public interface NSCoding {
public static class _CharacterSupport extends Support {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
/** Not yet implemented */
+ @Override
public Object decodeObject(NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -214,11 +229,13 @@ public interface NSCoding {
public static class _DateSupport extends Support {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
/** Not yet implemented */
+ @Override
public Object decodeObject(NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -233,11 +250,13 @@ public interface NSCoding {
public static class _StringSupport extends Support {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
/** Not yet implemented */
+ @Override
public Object decodeObject(NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -252,11 +271,13 @@ public interface NSCoding {
public static class _BooleanSupport extends Support {
/** Not yet implemented */
+ @Override
public void encodeWithCoder(Object obj, NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
/** Not yet implemented */
+ @Override
public Object decodeObject(NSCoder nscoder) {
throw new UnsupportedOperationException("Not Yet Implemented");
}
@@ -270,13 +291,13 @@ public interface NSCoding {
/** Helper class for NSCoding. */
public static abstract class Support {
- private static NSMutableDictionary classSupportMap = new NSMutableDictionary(16);
+ private static NSMutableDictionary<Class<?>, Support> classSupportMap = new NSMutableDictionary<>(16);
- public static Support supportForClass(Class aClass) {
+ public static Support supportForClass(Class<?> aClass) {
Support support = null;
- Class realClass = aClass;
+ Class<?> realClass = aClass;
while (support == null && realClass != null) {
- support = (Support) classSupportMap.objectForKey(realClass);
+ support = classSupportMap.objectForKey(realClass);
if (support == null)
realClass.getSuperclass();
// Cache if we had to look to a superclass.
@@ -286,7 +307,7 @@ public interface NSCoding {
return support;
}
- public static void setSupportForClass(Support support, Class class1) {
+ public static void setSupportForClass(Support support, Class<?> class1) {
classSupportMap.setObjectForKey(support, class1);
}
@@ -294,7 +315,7 @@ public interface NSCoding {
* Return the class of a given object. It boggles the mind as to why this is not
* a static, but in the original, it's not. &lt;sigh&gt;
*/
- public Class classForCoder(Object obj) {
+ public Class<?> classForCoder(Object obj) {
return obj.getClass();
}