public class ObjectNType extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static Class[] |
WELL_KNOWN_TYPES |
| Constructor and Description |
|---|
ObjectNType(char value) |
ObjectNType(Class clazz,
Serializable value)
keeps an object in a serialization-safe manner.
|
ObjectNType(double value) |
ObjectNType(float value) |
ObjectNType(int value) |
ObjectNType(long value) |
ObjectNType(Serializable value)
general constructor to keep an object safely
|
| Modifier and Type | Method and Description |
|---|---|
String |
getClassName()
the name of the class of the contained Object.
|
Object |
getData()
return the data contained in a safe way: if the class of the stored Object is not in the ClassPath
an Exception is thrown
|
Object |
getRawData()
gets the content "as is" (without deserializing)
|
boolean |
isOfPrimitiveType()
is the data to be considered of a primitive type
|
boolean |
isOfWellKnownType()
being of a "well known type" means that the data has not been "safely" Serialized
|
static boolean |
isWellKnownType(Class clazz)
is the class a "well known type" (primitive or defined in the constant array WELL_KNOWN_TYPES)
|
String |
toString() |
public static final Class[] WELL_KNOWN_TYPES
public ObjectNType(Class clazz, Serializable value)
clazz - mostly used to note an object of a primitive type (e.g. Integer.TYPE)value - can be nullpublic ObjectNType(Serializable value)
value - public ObjectNType(int value)
public ObjectNType(long value)
public ObjectNType(float value)
public ObjectNType(double value)
public ObjectNType(char value)
public static boolean isWellKnownType(Class clazz)
clazz - public String getClassName()
public boolean isOfPrimitiveType()
public boolean isOfWellKnownType()
public Object getData() throws ClassNotFoundException
ClassNotFoundExceptionpublic Object getRawData()
Copyright © 2014 LSST. All Rights Reserved.