Representation of a class property.
More...
#import <SCRuntimeProperty.h>
Representation of a class property.
- SDK
- macOS 10.6+, iOS 7.0+, GNUstep
- Since
- version 1.2.6
Provides access to runtime class properties:
- getting information about existing properties of classes;
- creating new properties;
- access to various properties parameters;
- add properties to existing classes and protocols;
- support for class properties (macOS and iOS only).
Class instances can thrown the following exceptions:
- Attention
- Some methods of the class are not supported on the GNUstep platform. Before using this class on this platform, You should carefully examine the documentation for the class and its methods.
- (BOOL) addToClass: |
|
(Class) |
class |
instance: |
|
(BOOL) |
instance |
|
|
| |
- SDK
- macOS 10.6+, iOS 7.0+
Adds a receiving property to a given existing class.
- Parameters
-
class | - existing class |
instance | - YES for adding an instance property, NO for adding a class property |
- Returns
- YES if a property was successfully added, otherwise NO
- Exceptions
-
- SDK
- macOS 10.6+, iOS 7.0+
Adds a receiving property to a given unregistered protocol.
- Parameters
-
protocol | - an unregistered protocol |
required | - YES for a required protocol property, NO for an optional protocol property |
instance | - YES for adding an instance property, NO for adding a class property |
- Returns
- YES if a property was successfully added, otherwise NO
- Exceptions
-
Adds a receiving property to a given unregistered class.
- Attention
- Class properties are supported only on macOS and iOS platforms. When this method is called on the GNUstep platform, the instance parameter value is ignored and the method always works only with instance properties.
- Parameters
-
class | - an unregistered class |
instance | - YES for adding an instance property, NO for adding a class property (ignored on GNUstep platform) |
- Returns
- YES if a property was successfully added, otherwise NO
- Exceptions
-
- (BOOL) availableInClass: |
|
(Class) |
class |
instance: |
|
(BOOL) |
instance |
|
|
| |
Returns a boolean value that indicates whether a receiving property is present in a given class.
- Attention
- Class properties are supported only on macOS and iOS platforms. When this method is called on the GNUstep platform, the instance parameter value is ignored and the method always works only with instance properties.
- Parameters
-
class | - an existing class |
instance | - YES for an instance property, NO for a class property (ignored on GNUstep platform) |
- Returns
- YES if a receving property is present in a given class, otherwise NO
- (BOOL) availableInProtocol: |
|
(SCRuntimeProtocol *) |
protocol |
required: |
|
(BOOL) |
required |
instance: |
|
(BOOL) |
instance |
|
|
| |
Returns a boolean value that indicates whether a receiving property is present in a given protocol.
- Attention
- Class properties are supported only on macOS and iOS platforms. When this method is called on the GNUstep platform, the instance parameter value is ignored and the method always works only with instance properties.
- Parameters
-
protocol | - an existing protocol |
required | - YES for a required protocol property, NO for an optional protocol property |
instance | - YES for an instance property, NO for a class property (ignored on GNUstep platform) |
- Returns
- YES if a receving property is present in a given protocol, otherwise NO
- (BOOL) availableInProtocolWithName: |
|
(NSString *) |
name |
required: |
|
(BOOL) |
required |
instance: |
|
(BOOL) |
instance |
|
|
| |
Returns a boolean value that indicates whether a receiving property is present in a protocol with a given name.
- Attention
- Class properties are supported only on macOS and iOS platforms. When this method is called on the GNUstep platform, the instance parameter value is ignored and the method always works only with instance properties.
- Parameters
-
name | - a protocol name |
required | - YES for a required protocol property, NO for an optional protocol property |
instance | - YES for an instance property, NO for a class property (ignored on GNUstep platform) |
- Returns
- YES if a receving property is present in a protocol with a given name, otherwise NO
Returns a boolean value that indicates whether a receiving property is present in a given unregistered class.
- Attention
- Class properties are supported only on macOS and iOS platforms. When this method is called on the GNUstep platform, the instance parameter value is ignored and the method always works only with instance properties.
- Parameters
-
class | - an unregistered class |
instance | - YES for an instance property, NO for a class property (ignored on GNUstep platform) |
- Returns
- YES if a receving property is present in a given unregistered class, otherwise NO
+ (instancetype) classPropertyWithClass: |
|
(Class) |
class |
name: |
|
(NSString *) |
name |
|
|
| |
- SDK
- macOS 10.6+, iOS 7.0+
Returns a class property created by using a given class and property name.
- Parameters
-
class | - a class |
name | - a property name |
- Returns
- A created property
- Exceptions
-
- (instancetype) initWithClass: |
|
(Class) |
class |
instance: |
|
(BOOL) |
instance |
name: |
|
(NSString *) |
name |
|
|
| |
- SDK
- macOS 10.6+, iOS 7.0+
Initializes a property created by using a given class, instance flag and property name.
- Attention
- Class properties are supported only on macOS and iOS platforms. When this method is called on the GNUstep platform, the instance parameter value is ignored and the method always works only with instance properties.
- Parameters
-
class | - a class |
instance | - YES for instance property and NO for class property (ignored on GNUstep) |
name | - a property name |
- Returns
- A created property
- Exceptions
-
- (instancetype) initWithName: |
|
(NSString *) |
name |
attributes: |
|
(NSDictionary *) |
attributes |
|
|
| |
Initializes a property using a given name and attributes.
- Parameters
-
name | - a property name |
attributes | - a dictionary that contains a property attributes |
- Returns
- A newly initialized property
- (instancetype) initWithObjCProperty: |
|
(objc_property_t) |
property |
|
Initializes a property using a given pointer to an existing runtime property.
- Parameters
-
property | - a pointer to a runtime property |
- Returns
- A newly initialized property
- (BOOL) isEqual: |
|
(id) |
object |
|
Returns a boolean value that indicates whether the receiving property is equals to a given object.
- Parameters
-
object | - an object with which to compare the receiving property |
- Returns
- YES if a given object is equals to the receiving property, otherwise NO
Reimplemented from SCObject.
- (BOOL) isEqualToName: |
|
(NSString *) |
name |
|
Returns a boolean value that indicates whether the receiving property is equals to a property with a given name.
- Parameters
-
name | - a name of property with which to compare the receiving property |
- Returns
- YES if the property with a given name is equals to the receiving property, otherwise NO
- (BOOL) isEqualToObjCProperty: |
|
(objc_property_t) |
property |
|
Returns a boolean value that indicates whether the receiving property is equals to a pointer to runtime property.
- Parameters
-
property | - a pointer to runtime property with which to compare the receiving property |
- Returns
- YES if a property with a given runtime pointer is equals to the receiving property, otherwise NO
Returns a boolean value that indicates whether the receiving property is equals to an another given property.
- Parameters
-
property | - the property with which to compare the receiving property |
- Returns
- YES if the other property is equals to the receiving property, otherwise NO
+ (instancetype) propertyWithClass: |
|
(Class) |
class |
name: |
|
(NSString *) |
name |
|
|
| |
Returns an instance property created by using a given class and property name.
- Parameters
-
class | - a class |
name | - a property name |
- Returns
- A created property
- Exceptions
-
+ (instancetype) propertyWithName: |
|
(NSString *) |
name |
attributes: |
|
(NSDictionary *) |
attributes |
|
|
| |
Returns a property created by using a given name and attributes.
- Parameters
-
name | - a property name |
attributes | - a dictionary that contains a property attributes |
- Returns
- A created property
+ (instancetype) propertyWithObjCProperty: |
|
(objc_property_t) |
property |
|
Returns a property created by using a given pointer to an existing runtime property.
- Parameters
-
property | - a pointer to a runtime property |
- Returns
- A created property
Returns a Boolean value that indicates whether the receiving property has assign attribute
- (NSString*) attributeEncodings |
|
readnonatomicretain |
- (NSDictionary *) attributes |
|
readnonatomicretain |
A dictionary with property attributes
Returns a Boolean value that indicates whether the receiving property has copy attribute
Returns a Boolean value that indicates whether the receiving property has dynamic attribute
- (BOOL) eligibleForGarbageCollection |
|
readnonatomicassign |
Returns a Boolean value that indicates whether the receiving property supports a garbage collection
Selector of a property getter method
- (NSString *) getterName |
|
readnonatomicretain |
Name of a property getter method
Returns a Boolean value that indicates whether the receiving property has nonatomic attribute
- (NSString *) oldEncoding |
|
readnonatomicretain |
Property encoding (old format)
Returns a Boolean value that indicates whether the receiving property is read only
Returns a Boolean value that indicates whether the receiving property has retain attribute
Selector of a property setter method
- (NSString *) setterName |
|
readnonatomicretain |
Name of a property setter method
A property setter semantic
Returns a Boolean value that indicates whether the receiving property has weak attribute
The documentation for this class was generated from the following files: