C# Class SimpleFramework.Xml.Core.Reflector

The Reflector object is used to determine the type of a generic type. This is used when the type of an XML annotation is not explicitly and the schema scanner needs to determine via reflection what the generic parameters are of a specific type. In particular this is used to determine the parameters within a list annotated with the ElementList annotation. This also has special handling for arrays within generic collections.
Afficher le fichier Open project: ngallagher/simplexml

Méthodes publiques

Méthode Description
GetClass ( ParameterizedType type ) : Class

This is used to extract the class from the specified type. If there are no actual generic type arguments to the specified type then this will return null. Otherwise this will return the actual class, regardless of whether the class is an array.

GetClass ( Type type ) : Class

This is used to extract the class from the specified type. If there are no actual generic type arguments to the specified type then this will return null. Otherwise this will return the actual class, regardless of whether the class is an array.

GetClasses ( ParameterizedType type ) : Class[]

This is used to extract the class from the specified type. If there are no actual generic type arguments to the specified type then this will return null. Otherwise this will return the actual class, regardless of whether the class is an array.

GetDependent ( Field field ) : Class

This method is used to acquire a generic parameter dependent from the specified field. This will acquire the field class and attempt to extract the first generic parameter type from that field. If there is a generic parameter then the class of that parameter is returned from this method.

GetDependents ( Field field ) : Class[]

This method is used to acquire generic parameter dependents from the specified field. This will acquire the field class and attempt to extract all of the generic parameter types from that field. If there is a generic parameter then the class of that parameter is returned from this method.

GetGenericClass ( Type type ) : Class

This is used to extract the class from the specified type. If there are no actual generic type arguments to the specified type then this will return null. Otherwise this will return the actual class, regardless of whether the class is an array.

GetParameterDependent ( Constructor factory, int index ) : Class

This method is used to acquire a generic parameter dependent from the specified parameter type. This will acquire the type for the parameter at the specified index and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method, otherwise null is returned.

GetParameterDependent ( Method method, int index ) : Class

This method is used to acquire a generic parameter dependent from the specified parameter type. This will acquire the type for the parameter at the specified index and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method, otherwise null is returned.

GetParameterDependents ( Constructor factory, int index ) : Class[]

This method is used to acquire a generic parameter dependent from the specified parameter type. This will acquire the type for the parameter at the specified index and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method, otherwise null is returned.

GetParameterDependents ( Method method, int index ) : Class[]

This method is used to acquire a generic parameter dependent from the specified parameter type. This will acquire the type for the parameter at the specified index and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method, otherwise null is returned.

GetParameterType ( Constructor factory, int index ) : ParameterizedType

This is used to acquire the parameterized types from the given constructors parameter class at the specified index position. If the parameter class is parameterized this returns the parameters that have been declared on that class.

GetParameterType ( Method method, int index ) : ParameterizedType

This is used to acquire the parameterized types from the given methods parameter class at the specified index position. If the parameter class is parameterized this returns the parameters that have been declared on that class.

GetReturnDependent ( Method method ) : Class

This method is used to acquire a generic parameter dependent from the method return type. This will acquire the return type and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method.

GetReturnDependents ( Method method ) : Class[]

This method is used to acquire a generic parameter dependent from the method return type. This will acquire the return type and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method.

GetReturnType ( Method method ) : ParameterizedType

This is used to acquire the parameterized types from the given methods return class. If the return type class is parameterized then this will return the parameters that have been declared on that class, otherwise null is returned.

GetType ( Field field ) : ParameterizedType

This is used to acquire the parameterized types from the given field. If the field class has been parameterized then this will return the parameters that have been declared on that class.

Method Details

GetClass() public méthode

This is used to extract the class from the specified type. If there are no actual generic type arguments to the specified type then this will return null. Otherwise this will return the actual class, regardless of whether the class is an array.
public GetClass ( ParameterizedType type ) : Class
type ParameterizedType /// this is the type to extract the class from ///
Résultat Class

GetClass() public méthode

This is used to extract the class from the specified type. If there are no actual generic type arguments to the specified type then this will return null. Otherwise this will return the actual class, regardless of whether the class is an array.
public GetClass ( Type type ) : Class
type System.Type /// this is the type to extract the class from ///
Résultat Class

GetClasses() public méthode

This is used to extract the class from the specified type. If there are no actual generic type arguments to the specified type then this will return null. Otherwise this will return the actual class, regardless of whether the class is an array.
public GetClasses ( ParameterizedType type ) : Class[]
type ParameterizedType /// this is the type to extract the class from ///
Résultat Class[]

GetDependent() public méthode

This method is used to acquire a generic parameter dependent from the specified field. This will acquire the field class and attempt to extract the first generic parameter type from that field. If there is a generic parameter then the class of that parameter is returned from this method.
public GetDependent ( Field field ) : Class
field Field /// this is the field to acquire the dependent class ///
Résultat Class

GetDependents() public méthode

This method is used to acquire generic parameter dependents from the specified field. This will acquire the field class and attempt to extract all of the generic parameter types from that field. If there is a generic parameter then the class of that parameter is returned from this method.
public GetDependents ( Field field ) : Class[]
field Field /// this is the field to acquire the dependent types ///
Résultat Class[]

GetGenericClass() public méthode

This is used to extract the class from the specified type. If there are no actual generic type arguments to the specified type then this will return null. Otherwise this will return the actual class, regardless of whether the class is an array.
public GetGenericClass ( Type type ) : Class
type System.Type /// this is the type to extract the class from ///
Résultat Class

GetParameterDependent() public méthode

This method is used to acquire a generic parameter dependent from the specified parameter type. This will acquire the type for the parameter at the specified index and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method, otherwise null is returned.
public GetParameterDependent ( Constructor factory, int index ) : Class
factory Constructor /// this is the constructor to acquire the dependent ///
index int /// this is the index to acquire the parameter from ///
Résultat Class

GetParameterDependent() public méthode

This method is used to acquire a generic parameter dependent from the specified parameter type. This will acquire the type for the parameter at the specified index and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method, otherwise null is returned.
public GetParameterDependent ( Method method, int index ) : Class
method Method /// this is the method to acquire the dependent of ///
index int /// this is the index to acquire the parameter from ///
Résultat Class

GetParameterDependents() public méthode

This method is used to acquire a generic parameter dependent from the specified parameter type. This will acquire the type for the parameter at the specified index and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method, otherwise null is returned.
public GetParameterDependents ( Constructor factory, int index ) : Class[]
factory Constructor /// this is the constructor to acquire the dependent ///
index int /// this is the index to acquire the parameter from ///
Résultat Class[]

GetParameterDependents() public méthode

This method is used to acquire a generic parameter dependent from the specified parameter type. This will acquire the type for the parameter at the specified index and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method, otherwise null is returned.
public GetParameterDependents ( Method method, int index ) : Class[]
method Method /// this is the method to acquire the dependent of ///
index int /// this is the index to acquire the parameter from ///
Résultat Class[]

GetParameterType() public méthode

This is used to acquire the parameterized types from the given constructors parameter class at the specified index position. If the parameter class is parameterized this returns the parameters that have been declared on that class.
public GetParameterType ( Constructor factory, int index ) : ParameterizedType
factory Constructor /// this is constructor method to acquire the parameters ///
index int /// this is the index to acquire the parameter from ///
Résultat ParameterizedType

GetParameterType() public méthode

This is used to acquire the parameterized types from the given methods parameter class at the specified index position. If the parameter class is parameterized this returns the parameters that have been declared on that class.
public GetParameterType ( Method method, int index ) : ParameterizedType
method Method /// this is the method to acquire the parameters from ///
index int /// this is the index to acquire the parameter from ///
Résultat ParameterizedType

GetReturnDependent() public méthode

This method is used to acquire a generic parameter dependent from the method return type. This will acquire the return type and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method.
public GetReturnDependent ( Method method ) : Class
method Method /// this is the method to acquire the dependent of ///
Résultat Class

GetReturnDependents() public méthode

This method is used to acquire a generic parameter dependent from the method return type. This will acquire the return type and attempt to extract the first generic parameter type from that type. If there is a generic parameter then the class of that parameter is returned from this method.
public GetReturnDependents ( Method method ) : Class[]
method Method /// this is the method to acquire the dependent of ///
Résultat Class[]

GetReturnType() public méthode

This is used to acquire the parameterized types from the given methods return class. If the return type class is parameterized then this will return the parameters that have been declared on that class, otherwise null is returned.
public GetReturnType ( Method method ) : ParameterizedType
method Method /// this is the method to acquire the parameters from ///
Résultat ParameterizedType

GetType() public méthode

This is used to acquire the parameterized types from the given field. If the field class has been parameterized then this will return the parameters that have been declared on that class.
public GetType ( Field field ) : ParameterizedType
field Field /// this is the field to acquire the parameters from ///
Résultat ParameterizedType