Nu Class Reference

NuClass

A Nu wrapper for class representations in the Objective-C runtime.

Superclass: NSObject
Declared in: objc/Nu.h

NuClass provides an object wrapper for classes that are represented in the Objective-C runtime. NuClass objects are used in the Nu language to manipulate and extend Objective-C classes.

Methods

+ (NSArray *) all
Get an array of all classes known to the Objective-C runtime. Beware, some of these classes may be deprecated, undocumented, or otherwise unsafe to use.

in objc/Nu.h

+ (NuClass *) classWithName: (NSString *) string
Create a class wrapper for the named Objective-C class.

in objc/Nu.h

+ (NuClass *) classWithClass: (Class) class
Create a class wrapper for the specified class (used from Objective-C).

in objc/Nu.h

- (id) addInstanceVariable: (NSString *) variableName
signature: (NSString *) signature
Add an instance variable to the receiving class. This will cause problems if there are already instances of the receiving class.

in objc/Nu.h

- (id) addClassMethod: (NSString *) methodName
signature: (NSString *) signature
body: (NuBlock *) block
Add a class method to a class with the specified name, type signature, and body.

in objc/Nu.h

- (id) addInstanceMethod: (NSString *) methodName
signature: (NSString *) signature
body: (NuBlock *) block
Add an instance method to a class with the specified name, type signature, and body.

in objc/Nu.h

- (void) setSuperclass: (NuClass *) newSuperclass
Change the superclass of a class. Be careful with this.

in objc/Nu.h

- (BOOL) isEqual: (NuClass *) anotherClass
Compare two classes for equality.

in objc/Nu.h

- (NSComparisonResult) compare: (NuClass *) anotherClass
Compare a class with another class by name. This allows arrays of classes to be easily sorted.

in objc/Nu.h

- (BOOL) isDerivedFromClass: (Class) parent
Determine whether a class is derived from another class.

in objc/Nu.h

- (NSArray *) instanceMethodNames
Get an array containing the names of the instance methods of a class.

in objc/Nu.h

- (NSArray *) classMethodNames
Get an array containing the names of the class methods of a class.

in objc/Nu.h

- (NSArray *) instanceMethods
Get an array containing NuMethod representations of the instance methods of a class.

in objc/Nu.h

- (NSArray *) classMethods
Get an array containing NuMethod representations of the class methods of a class.

in objc/Nu.h

- (NSString *) name
Get the name of a class.

in objc/Nu.h

- (Class) wrappedClass
Get the class corresponding to the NuClass wrapper (used from Objective-C).

in objc/Nu.h

- (id) initWithClassNamed: (NSString *) name
Initialize a class wrapper for the named Objective-C class.

in objc/Nu.h

- (id) initWithClass: (Class) class
Initialize a class wrapper for the specified class (used from Objective-C).

in objc/Nu.h