C# Class Encog.Util.ReflectionUtil

A set of C# reflection utilities.
Mostra file Open project: encog/encog-silverlight-core

Public Methods

Method Description
FindField ( Type c, String name ) : FieldInfo

Find the specified field, look also in superclasses.

GetAllFields ( Type c ) : IList

Get all of the fields from the specified class as a collection.

GetAllFields ( Type c, IList result ) : void

Get all of the fields for the specified class and recurse to check the base class.

HasAttribute ( FieldInfo field, Type t ) : bool

Determine if the specified field has the specified attribute.

HasAttribute ( Type t, Type attribute ) : bool

Determine if the specified type contains the specified attribute.

LoadClassmap ( ) : void

Load the classmap file. This allows classes to be resolved using just the simple name.

LoadObject ( String name ) : Object

Loop over all loaded assembles and try to create the class.

ResolveEncogClass ( String name ) : String

Resolve an encog class using its simple name.

ResolveEnum ( FieldInfo field, FieldInfo v ) : Object

Resolve an enumeration.

Private Methods

Method Description
ReflectionUtil ( ) : System

Private constructor.

Method Details

FindField() public static method

Find the specified field, look also in superclasses.
public static FindField ( Type c, String name ) : FieldInfo
c System.Type The class to search.
name String The name of the field we are looking for.
return System.Reflection.FieldInfo

GetAllFields() public static method

Get all of the fields from the specified class as a collection.
public static GetAllFields ( Type c ) : IList
c System.Type The class to access.
return IList

GetAllFields() public static method

Get all of the fields for the specified class and recurse to check the base class.
public static GetAllFields ( Type c, IList result ) : void
c System.Type The class to scan.
result IList A list of fields.
return void

HasAttribute() public static method

Determine if the specified field has the specified attribute.
public static HasAttribute ( FieldInfo field, Type t ) : bool
field System.Reflection.FieldInfo The field to check.
t System.Type See if the field has this attribute.
return bool

HasAttribute() public static method

Determine if the specified type contains the specified attribute.
public static HasAttribute ( Type t, Type attribute ) : bool
t System.Type The type.
attribute System.Type The attribute.
return bool

LoadClassmap() public static method

Load the classmap file. This allows classes to be resolved using just the simple name.
public static LoadClassmap ( ) : void
return void

LoadObject() public static method

Loop over all loaded assembles and try to create the class.
public static LoadObject ( String name ) : Object
name String The class to create.
return Object

ResolveEncogClass() public static method

Resolve an encog class using its simple name.
public static ResolveEncogClass ( String name ) : String
name String The simple name of the class.
return String

ResolveEnum() public static method

Resolve an enumeration.
public static ResolveEnum ( FieldInfo field, FieldInfo v ) : Object
field System.Reflection.FieldInfo The field to resolve.
v System.Reflection.FieldInfo The value to get the enum for.
return Object