public abstract class NSObject extends Object implements Cloneable, Comparable<NSObject>
| 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.
|
LocationInformation |
getLocationInformation()
Gets information about the location of this NSObject within the parsed property list,
if available.
|
protected void |
indent(StringBuilder xml,
int level)
Helper method that adds correct indentation to the xml output.
|
abstract 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.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompareTopublic LocationInformation getLocationInformation()
null if it is not available.public abstract NSObject clone()
public abstract 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 String toXMLPropertyList()
protected void indent(StringBuilder xml, int level)
level number of tab characters
to the xml string.xml - The StringBuilder onto which the XML representation is appended.level - The level of indentation.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 © 2024. All rights reserved.