C# Class PERWAPI.ReferenceScope

A scope for descriptors which are referenced
Inheritance: ResolutionScope
Mostrar archivo Open project: xored/f4 Class Usage Examples

Protected Properties

Property Type Description
defaultClass ClassRef

Public Methods

Method Description
AddClass ( string nsName, string name ) : ClassRef

Add a class to this Scope. If the class already exists, throw an exception.

AddClass ( ClassRef newClass ) : void

Add a class to this Scope. If this class already exists, throw an exception

AddField ( string name, Type fType ) : FieldRef

Add a field to this scope.

AddField ( FieldRef fld ) : void

Add a field to this scope.

AddMethod ( string name, Type retType, Type pars ) : MethodRef

Fetch a MethodRef descriptor for the method "retType name (pars)". If one exists, it is returned, else one is created.

AddMethod ( MethodRef meth ) : void

Add a method to this scope.

AddValueClass ( string nsName, string name ) : ClassRef

Add a value class to this scope. If the class already exists, throw an exception.

AddVarArgMethod ( string name, Type retType, Type pars, Type optPars ) : MethodRef

Fetch a MethodRef descriptor for the method "retType name (pars, optPars)". If one exists, it is returned, else one is created.

GetClass ( string name ) : ClassRef

Get a class of this scope, if it exists.

GetClass ( string nsName, string name ) : ClassRef

Get a class of this scope, if it exists.

GetClasses ( ) : PERWAPI.ClassRef[]

Get all the classes in this scope.

GetField ( string name ) : FieldRef

Fetch the FieldRef descriptor for the field "name" in this module, if one exists

GetFields ( ) : PERWAPI.FieldRef[]

Get all the fields of this module

GetMethod ( string name ) : MethodRef

Get a method of this scope, if it exists.

GetMethod ( string name, Type parTypes ) : MethodRef

Get a method of this scope, if it exists.

GetMethod ( string name, Type parTypes, Type optPars ) : MethodRef

Get a vararg method of this scope, if it exists.

GetMethods ( ) : PERWAPI.MethodRef[]

Get all the methods in this module

GetMethods ( string name ) : PERWAPI.MethodRef[]

Get all the methods with a specified name in this scope.

RemoveMethod ( MethodRef meth ) : void

Delete a method from this scope.

RemoveMethod ( int index ) : void

Delete a method from this scope.

RemoveMethod ( string name ) : void

Delete a method from this scope. If there are multiple methods with the same name, the first on the list will be deleted.

RemoveMethod ( string name, Type parTypes ) : void

Delete a method from this scope.

RemoveMethod ( string name, Type parTypes, Type optTypes ) : void

Delete a (vararg) method from this scope.

Private Methods

Method Description
AddFields ( ArrayList flds ) : void

Add a number of fields to this scope.

AddToClassList ( Class aClass ) : void
AddToFieldList ( FieldRef fld ) : void
AddToMethodList ( MethodRef meth ) : void
GetDefaultClass ( ) : ClassRef
GetMethod ( MethSig mSig ) : MethodRef
ReadAsDef ( ) : void
ReferenceScope ( string name ) : System
ReplaceClass ( Class aClass ) : void
SetDefaultClass ( ClassRef dClass ) : void
isDefaultClass ( ClassRef aClass ) : bool

Method Details

AddClass() public method

Add a class to this Scope. If the class already exists, throw an exception.
public AddClass ( string nsName, string name ) : ClassRef
nsName string name space name
name string class name
return ClassRef

AddClass() public method

Add a class to this Scope. If this class already exists, throw an exception
public AddClass ( ClassRef newClass ) : void
newClass ClassRef The class to be added
return void

AddField() public method

Add a field to this scope.
public AddField ( string name, Type fType ) : FieldRef
name string field name
fType Type field type
return FieldRef

AddField() public method

Add a field to this scope.
public AddField ( FieldRef fld ) : void
fld FieldRef The field to be added
return void

AddMethod() public method

Fetch a MethodRef descriptor for the method "retType name (pars)". If one exists, it is returned, else one is created.
public AddMethod ( string name, Type retType, Type pars ) : MethodRef
name string method name
retType Type return type
pars Type method parameter types
return MethodRef

AddMethod() public method

Add a method to this scope.
public AddMethod ( MethodRef meth ) : void
meth MethodRef The method to be added.
return void

AddValueClass() public method

Add a value class to this scope. If the class already exists, throw an exception.
public AddValueClass ( string nsName, string name ) : ClassRef
nsName string name space name
name string class name
return ClassRef

AddVarArgMethod() public method

Fetch a MethodRef descriptor for the method "retType name (pars, optPars)". If one exists, it is returned, else one is created.
public AddVarArgMethod ( string name, Type retType, Type pars, Type optPars ) : MethodRef
name string method name
retType Type return type
pars Type parameter types
optPars Type optional param types for this vararg method
return MethodRef

GetClass() public method

Get a class of this scope, if it exists.
public GetClass ( string name ) : ClassRef
name string The name of the class.
return ClassRef

GetClass() public method

Get a class of this scope, if it exists.
public GetClass ( string nsName, string name ) : ClassRef
nsName string The namespace of the class.
name string The name of the class.
return ClassRef

GetClasses() public method

Get all the classes in this scope.
public GetClasses ( ) : PERWAPI.ClassRef[]
return PERWAPI.ClassRef[]

GetField() public method

Fetch the FieldRef descriptor for the field "name" in this module, if one exists
public GetField ( string name ) : FieldRef
name string field name
return FieldRef

GetFields() public method

Get all the fields of this module
public GetFields ( ) : PERWAPI.FieldRef[]
return PERWAPI.FieldRef[]

GetMethod() public method

Get a method of this scope, if it exists.
public GetMethod ( string name ) : MethodRef
name string The name of the method.
return MethodRef

GetMethod() public method

Get a method of this scope, if it exists.
public GetMethod ( string name, Type parTypes ) : MethodRef
name string The name of the method
parTypes Type The signature of the method.
return MethodRef

GetMethod() public method

Get a vararg method of this scope, if it exists.
public GetMethod ( string name, Type parTypes, Type optPars ) : MethodRef
name string The name of the method.
parTypes Type The signature of the method.
optPars Type The optional parameters of the vararg method.
return MethodRef

GetMethods() public method

Get all the methods in this module
public GetMethods ( ) : PERWAPI.MethodRef[]
return PERWAPI.MethodRef[]

GetMethods() public method

Get all the methods with a specified name in this scope.
public GetMethods ( string name ) : PERWAPI.MethodRef[]
name string The name of the method(s).
return PERWAPI.MethodRef[]

RemoveMethod() public method

Delete a method from this scope.
public RemoveMethod ( MethodRef meth ) : void
meth MethodRef The method to be deleted.
return void

RemoveMethod() public method

Delete a method from this scope.
public RemoveMethod ( int index ) : void
index int The index of the method to be deleted. Index /// into array returned by GetMethods().
return void

RemoveMethod() public method

Delete a method from this scope. If there are multiple methods with the same name, the first on the list will be deleted.
public RemoveMethod ( string name ) : void
name string The name of the method to delete.
return void

RemoveMethod() public method

Delete a method from this scope.
public RemoveMethod ( string name, Type parTypes ) : void
name string The name of the method to be deleted.
parTypes Type The signature of the method to be deleted.
return void

RemoveMethod() public method

Delete a (vararg) method from this scope.
public RemoveMethod ( string name, Type parTypes, Type optTypes ) : void
name string The name of the method to be deleted.
parTypes Type The signature of the method to be deleted.
optTypes Type The optional parameters of the vararg method.
return void

Property Details

defaultClass protected_oe property

A default class decriptor for globals
protected ClassRef,PERWAPI defaultClass
return ClassRef