| Constructor and Description |
|---|
NSObject() |
| Modifier and Type | Method and Description |
|---|---|
abstract NSObject |
clone()
Creates and returns a deep copy of this instance.
|
static NSObject |
fromJavaObject(Object object)
Serializes the specified object into an NSObject.
|
protected abstract void |
toASCII(StringBuilder ascii,
int level)
Generates the ASCII representation of this object.
|
protected abstract void |
toASCIIGnuStep(StringBuilder ascii,
int level)
Generates the ASCII representation of this object in the GnuStep format.
|
Object |
toJavaObject()
Converts this NSObject into an equivalent object of the Java Runtime Environment.
|
<T> T |
toJavaObject(Class<T> clazz)
Converts this NSObject into an object of the specified class.
|
String |
toXMLPropertyList()
Generates a valid XML property list including headers using this object as root.
|
public abstract NSObject clone()
public String toXMLPropertyList()
protected abstract void toASCII(StringBuilder ascii, int level)
ascii - The StringBuilder onto which the ASCII representation is appended.level - The indentation level of the object.protected abstract void toASCIIGnuStep(StringBuilder ascii, int level)
ascii - The StringBuilder onto which the ASCII representation is appended.level - The indentation level of the object.public Object toJavaObject()
NSArray objects are converted to arrays.NSDictionary objects are converted to objects extending the Map class.NSSet objects are converted to objects extending the Set class.NSNumber objects are converted to primitive number values (int, long, double or boolean).NSString objects are converted to String objects.NSData objects are converted to byte arrays.NSDate objects are converted to Date objects.UID objects are converted to byte arrays.public <T> T toJavaObject(Class<T> clazz)
T - The target object type.clazz - The target class.IllegalArgumentException - If the specified class cannot be deserialized from this NSObject.public static NSObject fromJavaObject(Object object)
NSDictionary.
The dictionary will contain the values of all publicly accessible fields and properties.object - The object to serialize.IllegalArgumentException - If the specified object throws an exception while getting its properties.Copyright © 2019. All Rights Reserved.