Samond Classes Library 1.2.6-STABLE build 219
List of all members
SCRuntimeProperty Class Reference

Representation of a class property. More...

#import <SCRuntimeProperty.h>

+ Inheritance diagram for SCRuntimeProperty:

Creating and Initializing Properties

(instancetype) + propertyWithObjCProperty:
 
(instancetype) + propertyWithName:attributes:
 
(instancetype) + propertyWithClass:name:
 
(instancetype) + classPropertyWithClass:name:
 
(instancetype) - initWithObjCProperty:
 
(instancetype) - initWithName:attributes:
 
(instancetype) - initWithClass:instance:name:
 

Quering Properties

NSString * name
 
NSDictionary * attributes
 
NSString * attributeEncodings
 
BOOL readonly
 
SCRuntimePropertySetterSemantics setterSemantics
 
BOOL assignProperty
 
BOOL retainProperty
 
BOOL copyProperty
 
BOOL nonatomic
 
BOOL dynamic
 
BOOL weakReference
 
BOOL eligibleForGarbageCollection
 
SEL getter
 
SEL setter
 
NSString * getterName
 
NSString * setterName
 
NSString * encoding
 
NSString * oldEncoding
 
NSString * fieldName
 

Comparing Properties

(BOOL) - isEqualToProperty:
 
(BOOL) - isEqualToName:
 
(BOOL) - isEqual:
 
(BOOL) - isEqualToObjCProperty:
 

Communicating with Classes

(BOOL) - addToClass:instance:
 
(BOOL) - addToUnregisteredClass:instance:
 
(BOOL) - availableInClass:instance:
 
(BOOL) - availableInUnregisteredClass:instance:
 

Communicating with Protocols

(void) - addToProtocol:required:instance:
 
(BOOL) - availableInProtocol:required:instance:
 
(BOOL) - availableInProtocolWithName:required:instance:
 

Additional Inherited Members

- Instance Methods inherited from SCObject
(instancetype) - initWithCoder:
 
(instancetype) - initWithContentsOfSerializedFile:
 
(void) - encodeWithCoder:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionary:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionary:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithStream:
 
(instancetype) - initWithFileStream:
 
(void) - writeToStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
(instancetype) - initWithData:
 
(instancetype) - initWithDataWrapper:
 
(instancetype) - initWithContentsOfFile:
 
(instancetype) - initWithContentsOfURL:
 
(instancetype) - initWithContentsOfURLString:
 
(void) - writeToData:
 
(BOOL) - writeToFile:
 
(BOOL) - writeToURL:
 
(BOOL) - writeToURLString:
 
(NSData *) - data
 
- Properties inherited from SCObject
NSString * className
 

Detailed Description

Representation of a class property.

SDK
macOS 10.6+, iOS 7.0+, GNUstep
Since
version 1.2.6

Provides access to runtime class properties:

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.

Method Documentation

- (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
SCRuntimeException- runtime error detected
- (void) addToProtocol: (SCRuntimeUnregisteredProtocol *)  protocol
required: (BOOL)  required
instance: (BOOL)  instance 
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
SCRuntimeException- runtime error detected
- (BOOL) addToUnregisteredClass: (SCRuntimeUnregisteredClass *)  class
instance: (BOOL)  instance 

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
SCRuntimeException- runtime error detected
- (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
- (BOOL) availableInUnregisteredClass: (SCRuntimeUnregisteredClass *)  class
instance: (BOOL)  instance 

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
SCRuntimeException- runtime error detected
- (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
SCRuntimeException- runtime error detected
- (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
- (BOOL) isEqualToProperty: (SCRuntimeProperty *)  property

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
SCRuntimeException- runtime error detected
+ (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

Property Documentation

- (BOOL) assignProperty
readnonatomicassign

Returns a Boolean value that indicates whether the receiving property has assign attribute

- (NSString*) attributeEncodings
readnonatomicretain

An attribute encodings

- (NSDictionary *) attributes
readnonatomicretain

A dictionary with property attributes

- (BOOL) copyProperty
readnonatomicassign

Returns a Boolean value that indicates whether the receiving property has copy attribute

- (BOOL) dynamic
readnonatomicassign

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

- (NSString *) encoding
readnonatomicretain

Property encoding

- (NSString *) fieldName
readnonatomicretain

Property field

- (SEL) getter
readnonatomicassign

Selector of a property getter method

- (NSString *) getterName
readnonatomicretain

Name of a property getter method

- (NSString*) name
readnonatomicretain

A property name

- (BOOL) nonatomic
readnonatomicassign

Returns a Boolean value that indicates whether the receiving property has nonatomic attribute

- (NSString *) oldEncoding
readnonatomicretain

Property encoding (old format)

- (BOOL) readonly
readnonatomicassign

Returns a Boolean value that indicates whether the receiving property is read only

- (BOOL) retainProperty
readnonatomicassign

Returns a Boolean value that indicates whether the receiving property has retain attribute

- (SEL) setter
readnonatomicassign

Selector of a property setter method

- (NSString *) setterName
readnonatomicretain

Name of a property setter method

- (SCRuntimePropertySetterSemantics) setterSemantics
readnonatomicassign

A property setter semantic

- (BOOL) weakReference
readnonatomicassign

Returns a Boolean value that indicates whether the receiving property has weak attribute


The documentation for this class was generated from the following files: