C# Class Monobjc.Runtime.Bridge

Show file Open project: Monobjc/monobjc

Public Methods

Method Description
DefineCategory ( CategoryGenerator categoryGenerator, Type type ) : void

Defines a category, by using various attributes.

DefineClass ( ClassGenerator classGenerator, Type type ) : void

Defines the given class by installing a proxy, that will forward native calls to the corresponding instance.

Private Methods

Method Description
AddMethod ( IntPtr cls, bool meta, IntPtr handle, String methodName, String methodEncoding ) : void
AddMethods ( IntPtr cls, bool meta, String methodNames, IntPtr methodImplementations, String methodEncodings ) : void
CollectInstanceMethods ( Type type ) : Monobjc.Generators.MethodTuple[]

Collect every public instance method with an attribute defined in the type.

CollectInstanceVariables ( Type type ) : Monobjc.Generators.VariableTuple[]

Collect every public properties with an attribute.

CollectStaticMethods ( Type type ) : Monobjc.Generators.MethodTuple[]

Collect every public static method with an attribute.

CreateClass ( String className, String superClassName, String ivarNames, IntPtr ivarTypes ) : Class
ExtractCategoryClassName ( Type type ) : String

Extract the category's class name to use when defining a new category.

ExtractClassName ( Type type ) : String

Extract the class name to use when defining a new class : Check for the presence of a ObjectiveCClassAttribute on the type. If the attribute is missing, an exception is thrown. Check for the name value of the ObjectiveCClassAttribute. If the attribute doesn't supply a name, the short name of the Type is used.

ExtractSuperClassName ( Type type ) : String

Extract the super class name to use when defining a new class : Check for the presence of a ObjectiveCClassAttribute on the base type. If the attribute is missing, an exception is thrown unless this is a for a Root Class. Check for the name value of the ObjectiveCClassAttribute. If the attribute doesn't supply a name, the short name of the Type is used. Check for the name found previously and correct it if the super class name is the imposter one.

InterceptDeallocFor ( Class cls ) : void
IsNative ( Type type ) : bool

Determines if the specified type is native backed.

NeedInterception ( Type type ) : bool

Determines whether the specified type requires a dealloc interception for lifecycle purpose.

Method Details

DefineCategory() public static method

Defines a category, by using various attributes.
public static DefineCategory ( CategoryGenerator categoryGenerator, Type type ) : void
categoryGenerator Monobjc.Generators.CategoryGenerator The category generator to use.
type System.Type The type that contains the definition attibutes.
return void

DefineClass() public static method

Defines the given class by installing a proxy, that will forward native calls to the corresponding instance.
public static DefineClass ( ClassGenerator classGenerator, Type type ) : void
classGenerator Monobjc.Generators.ClassGenerator The class generator.
type System.Type The type.
return void