|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsst.ccs.bus.ObjectNType
public class ObjectNType
This class contains information about an object and it class. this information can be used in different ways:
| Field Summary | |
|---|---|
static Class[] |
WELL_KNOWN_TYPES
|
| Constructor Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Class[] WELL_KNOWN_TYPES
| Constructor Detail |
|---|
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)
| Method Detail |
|---|
public static boolean isWellKnownType(Class clazz)
clazz -
public String getClassName()
public boolean isOfPrimitiveType()
public boolean isOfWellKnownType()
public Object getData()
throws ClassNotFoundException
ClassNotFoundExceptionpublic Object getRawData()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||